結果
問題 |
No.1453 手助け
|
ユーザー |
![]() |
提出日時 | 2021-04-16 18:32:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 58,880 KB |
最終ジャッジ日時 | 2024-07-02 18:51:18 |
合計ジャッジ時間 | 2,039 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 11 |
ソースコード
a, b, c, d, e = map(int, input().split()) n = a*(b-c) if n == 0: print(0) exit() ans = 0 x = -1 for i in range(1, n+1): if i == 1: ans += d x = d continue if (i-1)%10 != 0: ans += x else: if e <= x: ans += x-e x -= e else: ans += x print(ans)