結果
問題 | No.1453 手助け |
ユーザー |
![]() |
提出日時 | 2021-03-31 21:02:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 1,035 ms |
コンパイル使用メモリ | 82,456 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-15 08:27:48 |
合計ジャッジ時間 | 1,901 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> #include <map> #include <cmath> #include <queue> #include <vector> #include <string> #include <algorithm> #include <functional> using namespace std; #pragma warning (disable: 4996) int A, B, C, D, E; int Sum = 0; int main() { cin >> A >> B >> C >> D >> E; int pre = D; for (int i = 1; i <= A * (B - C); i++) { int nex = pre; if (i % 10 == 0) { if (E <= pre) nex = pre - E; else nex = pre; } Sum += nex; pre = nex; } cout << Sum << endl; return 0; }