結果

問題 No.2386 Udon Coupon (Easy)
ユーザー shobonvipshobonvip
提出日時 2023-07-21 21:32:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,716 KB
実行使用メモリ 67,636 KB
最終ジャッジ日時 2023-10-21 21:22:06
合計ジャッジ時間 3,013 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,412 KB
testcase_01 AC 36 ms
53,412 KB
testcase_02 AC 36 ms
53,412 KB
testcase_03 AC 36 ms
53,412 KB
testcase_04 AC 32 ms
53,412 KB
testcase_05 AC 35 ms
53,412 KB
testcase_06 AC 35 ms
53,412 KB
testcase_07 AC 50 ms
67,636 KB
testcase_08 AC 33 ms
53,412 KB
testcase_09 AC 31 ms
53,412 KB
testcase_10 AC 40 ms
62,348 KB
testcase_11 AC 44 ms
62,140 KB
testcase_12 AC 45 ms
65,056 KB
testcase_13 AC 46 ms
65,388 KB
testcase_14 AC 47 ms
67,372 KB
testcase_15 AC 49 ms
67,424 KB
testcase_16 AC 46 ms
64,988 KB
testcase_17 AC 47 ms
67,448 KB
testcase_18 AC 41 ms
62,416 KB
testcase_19 AC 40 ms
61,976 KB
testcase_20 AC 46 ms
65,052 KB
testcase_21 AC 52 ms
67,440 KB
testcase_22 AC 46 ms
64,816 KB
testcase_23 AC 45 ms
64,740 KB
testcase_24 AC 42 ms
62,216 KB
testcase_25 AC 47 ms
64,976 KB
testcase_26 AC 50 ms
67,396 KB
testcase_27 AC 50 ms
67,604 KB
testcase_28 AC 43 ms
62,568 KB
testcase_29 AC 44 ms
62,396 KB
testcase_30 AC 41 ms
61,976 KB
testcase_31 AC 45 ms
64,712 KB
testcase_32 AC 42 ms
61,976 KB
testcase_33 AC 52 ms
67,636 KB
testcase_34 AC 46 ms
64,684 KB
testcase_35 AC 48 ms
65,148 KB
testcase_36 AC 50 ms
67,440 KB
testcase_37 AC 49 ms
65,188 KB
testcase_38 AC 45 ms
64,764 KB
testcase_39 AC 43 ms
62,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a, b, c = map(int,input().split())
dp = [- 10 ** 18] * (n+1)
dp[0] = 0
v = [(3,a), (5,b), (10,c)]

for i in range(1, n+1):
	for x, y in v:
		if i - x < 0: continue
		dp[i] = max(dp[i], dp[i-x] + y)

print(max(dp))
0