結果

問題 No.1453 手助け
コンテスト
ユーザー yoshihiko
提出日時 2021-06-29 23:29:56
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 467 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 360 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2026-03-12 14:43:45
合計ジャッジ時間 3,587 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a, b, c, d, e = list(map(int, input().split()))
come = b - c
buy = come * a
sum = 0

if come == 0:
    print(0)
else:
    x = 0
    for i in range(buy):
        res = 0
        if i == 0:
            res = d
        else:
            if i % 10 != 0:
                res = x
            elif i % 10 == 0 and e <= x:
                res = x - e
            elif i % 10 == 0 and e >= x:
                res = x

        x = res
        sum += res
            
print(sum)
0