結果

問題 No.2386 Udon Coupon (Easy)
ユーザー 👑 MizarMizar
提出日時 2023-07-04 15:13:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 433 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 11,896 KB
実行使用メモリ 17,852 KB
最終ジャッジ日時 2023-10-20 02:46:54
合計ジャッジ時間 10,477 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,088 KB
testcase_01 AC 32 ms
10,088 KB
testcase_02 AC 31 ms
10,096 KB
testcase_03 AC 30 ms
10,088 KB
testcase_04 AC 29 ms
10,088 KB
testcase_05 AC 30 ms
10,088 KB
testcase_06 AC 30 ms
10,096 KB
testcase_07 AC 429 ms
17,852 KB
testcase_08 AC 30 ms
10,088 KB
testcase_09 AC 29 ms
10,088 KB
testcase_10 AC 122 ms
11,780 KB
testcase_11 AC 71 ms
10,744 KB
testcase_12 AC 327 ms
15,740 KB
testcase_13 AC 433 ms
17,588 KB
testcase_14 AC 364 ms
16,532 KB
testcase_15 AC 405 ms
17,324 KB
testcase_16 AC 316 ms
15,476 KB
testcase_17 AC 394 ms
16,796 KB
testcase_18 AC 175 ms
12,836 KB
testcase_19 AC 57 ms
10,624 KB
testcase_20 AC 289 ms
14,948 KB
testcase_21 AC 370 ms
16,796 KB
testcase_22 AC 227 ms
13,892 KB
testcase_23 AC 210 ms
13,628 KB
testcase_24 AC 92 ms
11,252 KB
testcase_25 AC 281 ms
14,684 KB
testcase_26 AC 388 ms
16,532 KB
testcase_27 AC 410 ms
17,588 KB
testcase_28 AC 224 ms
13,628 KB
testcase_29 AC 135 ms
12,044 KB
testcase_30 AC 52 ms
10,520 KB
testcase_31 AC 204 ms
13,364 KB
testcase_32 AC 61 ms
10,664 KB
testcase_33 AC 429 ms
17,852 KB
testcase_34 AC 245 ms
13,892 KB
testcase_35 AC 326 ms
15,476 KB
testcase_36 AC 414 ms
17,588 KB
testcase_37 AC 322 ms
15,740 KB
testcase_38 AC 259 ms
14,420 KB
testcase_39 AC 184 ms
13,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a,b,c = map(int,input().split())
dp = [0] * (n + 10)

for i in range(n):
	dp[i + 1] = max(dp[i + 1], dp[i])
	dp[i + 3] = max(dp[i + 3], dp[i] + a)
	dp[i + 5] = max(dp[i + 5], dp[i] + b)
	dp[i + 10] = max(dp[i + 10], dp[i] + c)

print(dp[n])
0