結果
問題 | No.1453 手助け |
ユーザー |
|
提出日時 | 2021-04-17 14:14:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 2,870 ms |
コンパイル使用メモリ | 190,948 KB |
最終ジャッジ日時 | 2025-01-20 21:17:33 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int a,b,c,d,e,x,ans,i;cin >> a >> b >> c >> d >> e;ans=0;for(i=1; i<=a*(b-c); i++){if(i==1){ans+=d;x=d;}else if(i%10==0 && e<=x){x-=e;ans+=x;}else{ans+=x;}}cout << ans << endl;return 0;}