結果

問題 No.1453 手助け
コンテスト
ユーザー lam6er
提出日時 2025-03-20 21:08:08
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 459 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 227 ms
コンパイル使用メモリ 95,856 KB
実行使用メモリ 83,252 KB
最終ジャッジ日時 2026-07-07 12:52:56
合計ジャッジ時間 3,391 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A, B, C, D, E = map(int, input().split())
total = A * (B - C)

if total == 0:
    print(0)
else:
    total_cost = 0
    current_price = D
    total_cost += current_price

    for i in range(2, total + 1):
        if i % 10 == 0:
            if current_price >= E:
                current_price -= E
            # else, remains the same as before
        # Update the total cost with the current price
        total_cost += current_price

    print(total_cost)
0