結果
| 問題 |
No.1453 手助け
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-31 21:04:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 234 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 82,260 KB |
| 実行使用メモリ | 60,164 KB |
| 最終ジャッジ日時 | 2024-12-15 09:08:51 |
| 合計ジャッジ時間 | 2,206 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
a,b,c,d,e=map(int,input().split())
n=a*(b-c)
if n==0:
print(0);exit()
ans=d
now=d
for i in range(2,n+1):
if i%10!=0:ans+=now
else:
if e<=now:
now-=e
ans+=now
else:ans+=now
print(ans)