結果
問題 |
No.1453 手助け
|
ユーザー |
![]() |
提出日時 | 2021-03-31 21:21:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 1,919 ms |
コンパイル使用メモリ | 168,152 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 14:21:01 |
合計ジャッジ時間 | 3,121 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e; cin >> a >> b >> c >> d >> e; int ans = 0; for(int i=1;i<=a;i++){ if(i%10!=0){ ans+=d; } else if(i%10==0&&e<=d){ d=d-e; ans+=d; } else{ ans+=d; } } cout << (b-c)*ans << endl; }