結果

問題 No.1453 手助け
ユーザー lie_of_lillie
提出日時 2021-04-27 13:05:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-06 06:53:36
合計ジャッジ時間 1,524 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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


n = B - C

if n == 0:
    print(0)
    exit()
if n == 1:
    print(D)
    exit()

    
acc = D
x = D
for i in range(1, n):
    if i%10 != 0:
        acc += x
    elif i%10 == 0 and x > E:
        x -= E
        acc += x
    elif i%10 == 0 and x < E:
        acc += x

print(acc)
0