結果

問題 No.2386 Udon Coupon (Easy)
ユーザー minimumminimum
提出日時 2023-07-21 22:39:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 81,380 KB
実行使用メモリ 71,780 KB
最終ジャッジ日時 2023-10-21 22:40:17
合計ジャッジ時間 3,386 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,240 KB
testcase_01 AC 34 ms
53,240 KB
testcase_02 AC 35 ms
53,240 KB
testcase_03 AC 35 ms
53,240 KB
testcase_04 AC 36 ms
53,240 KB
testcase_05 AC 38 ms
53,240 KB
testcase_06 AC 38 ms
53,240 KB
testcase_07 AC 55 ms
71,780 KB
testcase_08 AC 35 ms
53,240 KB
testcase_09 AC 38 ms
53,240 KB
testcase_10 AC 47 ms
64,444 KB
testcase_11 AC 45 ms
62,124 KB
testcase_12 AC 49 ms
69,144 KB
testcase_13 AC 52 ms
71,524 KB
testcase_14 AC 54 ms
71,516 KB
testcase_15 AC 52 ms
71,576 KB
testcase_16 AC 48 ms
69,140 KB
testcase_17 AC 53 ms
71,592 KB
testcase_18 AC 46 ms
64,520 KB
testcase_19 AC 45 ms
62,024 KB
testcase_20 AC 50 ms
69,132 KB
testcase_21 AC 55 ms
71,584 KB
testcase_22 AC 52 ms
66,912 KB
testcase_23 AC 51 ms
66,836 KB
testcase_24 AC 45 ms
64,312 KB
testcase_25 AC 50 ms
67,008 KB
testcase_26 AC 57 ms
71,540 KB
testcase_27 AC 54 ms
71,684 KB
testcase_28 AC 47 ms
66,720 KB
testcase_29 AC 47 ms
64,492 KB
testcase_30 AC 45 ms
62,024 KB
testcase_31 AC 49 ms
66,808 KB
testcase_32 AC 44 ms
62,024 KB
testcase_33 AC 54 ms
71,780 KB
testcase_34 AC 48 ms
66,788 KB
testcase_35 AC 50 ms
69,228 KB
testcase_36 AC 54 ms
71,592 KB
testcase_37 AC 53 ms
69,332 KB
testcase_38 AC 49 ms
66,868 KB
testcase_39 AC 46 ms
64,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [3, 5, 10]
B = list(map(int, input().split()))

dp = [0] * (N + 1)
for i in range(1, N + 1):
    for j in range(3):
        if i >= A[j]:
            dp[i] = max(dp[i], dp[i - A[j]] + B[j])

print(max(dp))
0