結果

問題 No.1453 手助け
ユーザー titiatitia
提出日時 2021-03-31 21:18:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 494 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 10,772 KB
実行使用メモリ 55,408 KB
最終ジャッジ日時 2023-08-21 22:28:28
合計ジャッジ時間 13,301 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 476 ms
55,284 KB
testcase_01 AC 469 ms
55,248 KB
testcase_02 AC 476 ms
55,288 KB
testcase_03 AC 482 ms
55,272 KB
testcase_04 AC 490 ms
55,316 KB
testcase_05 AC 483 ms
55,200 KB
testcase_06 AC 479 ms
55,224 KB
testcase_07 AC 485 ms
55,264 KB
testcase_08 AC 480 ms
55,316 KB
testcase_09 AC 478 ms
55,200 KB
testcase_10 AC 481 ms
55,184 KB
testcase_11 AC 487 ms
55,232 KB
testcase_12 AC 482 ms
55,264 KB
testcase_13 AC 481 ms
55,288 KB
testcase_14 AC 484 ms
55,348 KB
testcase_15 AC 487 ms
55,352 KB
testcase_16 AC 481 ms
55,312 KB
testcase_17 AC 483 ms
55,200 KB
testcase_18 AC 469 ms
55,180 KB
testcase_19 AC 482 ms
55,408 KB
testcase_20 AC 474 ms
55,276 KB
testcase_21 AC 494 ms
55,236 KB
testcase_22 AC 480 ms
55,196 KB
testcase_23 AC 488 ms
55,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

A,B,C,D,E=map(int,input().split())
k=(B-C)*A
DP=[D]

for i in range(1000000):
    X=DP[-1]
    if (i+2)%10!=0:
        DP.append(X)
    elif E<=X:
        DP.append(X-E)
    else:
        DP.append(X)


S=[0]
for i in range(1000000):
    S.append(S[-1]+DP[i])

print(S[k])
        
0