結果

問題 No.1453 手助け
ユーザー miya145592
提出日時 2023-04-30 22:00:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 58,636 KB
最終ジャッジ日時 2024-11-19 11:38:16
合計ジャッジ時間 2,294 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C, D, E = map(int, input().split())
cnt = (B-C)*A
ans = 0
X = 0
for i in range(cnt):
    if i==0:
        ans+=D
        X=D
    else:
        if (i+1)%10==0:
            if E<=X:
                ans+=X-E
                X = X-E
            else:
                ans+=X
        else:
            ans+=X
print(ans)
0