結果
問題 | No.1453 手助け |
ユーザー |
![]() |
提出日時 | 2021-03-31 21:33:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 483 bytes |
コンパイル時間 | 1,521 ms |
コンパイル使用メモリ | 166,444 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 15:43:54 |
合計ジャッジ時間 | 2,334 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> P; typedef vector<ll> VI; typedef vector<VI> VVI; #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) v.begin(),v.end() constexpr ll MOD=1000000007; constexpr ll INF=2e18; int main(){ int a, b, c, d, e; cin >> a >> b >> c >> d >> e; int ans=0, x=d; REP(i,a*(b-c)){ if(i%10==9&&e<=x) x-=e; ans+=x; } cout << ans << endl; return 0; }