結果

問題 No.2386 Udon Coupon (Easy)
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2023-07-21 21:31:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 431 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 593 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 17,808 KB
最終ジャッジ日時 2023-10-21 21:21:54
合計ジャッジ時間 9,786 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
10,024 KB
testcase_01 AC 24 ms
10,024 KB
testcase_02 AC 24 ms
10,032 KB
testcase_03 AC 24 ms
10,024 KB
testcase_04 AC 24 ms
10,024 KB
testcase_05 AC 24 ms
10,024 KB
testcase_06 AC 25 ms
10,032 KB
testcase_07 AC 421 ms
17,808 KB
testcase_08 AC 25 ms
10,024 KB
testcase_09 AC 24 ms
10,024 KB
testcase_10 AC 115 ms
11,736 KB
testcase_11 AC 67 ms
10,680 KB
testcase_12 AC 312 ms
15,696 KB
testcase_13 AC 404 ms
17,280 KB
testcase_14 AC 350 ms
16,488 KB
testcase_15 AC 397 ms
17,280 KB
testcase_16 AC 304 ms
15,432 KB
testcase_17 AC 360 ms
16,752 KB
testcase_18 AC 171 ms
12,792 KB
testcase_19 AC 52 ms
10,552 KB
testcase_20 AC 290 ms
14,904 KB
testcase_21 AC 382 ms
16,752 KB
testcase_22 AC 225 ms
13,848 KB
testcase_23 AC 211 ms
13,320 KB
testcase_24 AC 87 ms
10,976 KB
testcase_25 AC 270 ms
14,640 KB
testcase_26 AC 357 ms
16,488 KB
testcase_27 AC 414 ms
17,544 KB
testcase_28 AC 211 ms
13,584 KB
testcase_29 AC 134 ms
12,000 KB
testcase_30 AC 46 ms
10,452 KB
testcase_31 AC 216 ms
13,320 KB
testcase_32 AC 57 ms
10,604 KB
testcase_33 AC 431 ms
17,808 KB
testcase_34 AC 234 ms
13,848 KB
testcase_35 AC 315 ms
15,432 KB
testcase_36 AC 426 ms
17,544 KB
testcase_37 AC 328 ms
15,696 KB
testcase_38 AC 247 ms
14,376 KB
testcase_39 AC 190 ms
13,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = list(map(int, input().split()))
X = [3, 5, 10]
dp = [0] * (N + 1)
for i in range(1, N + 1) :
	for j in range(3) :
		if i >= X[j] :
			dp[i] = max(dp[i], dp[i - X[j]] + P[j])
print(dp[N])
0