結果

問題 No.2386 Udon Coupon (Easy)
ユーザー えなじ~🔋▶️えなじ~🔋▶️
提出日時 2023-07-21 21:32:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 515 ms
コンパイル使用メモリ 81,668 KB
実行使用メモリ 63,540 KB
最終ジャッジ日時 2023-10-21 21:23:18
合計ジャッジ時間 3,267 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,332 KB
testcase_01 AC 38 ms
53,332 KB
testcase_02 AC 39 ms
53,332 KB
testcase_03 AC 39 ms
53,332 KB
testcase_04 AC 39 ms
53,332 KB
testcase_05 AC 38 ms
53,332 KB
testcase_06 AC 38 ms
53,332 KB
testcase_07 AC 53 ms
63,540 KB
testcase_08 AC 38 ms
53,332 KB
testcase_09 AC 38 ms
53,332 KB
testcase_10 AC 50 ms
62,348 KB
testcase_11 AC 47 ms
60,012 KB
testcase_12 AC 47 ms
61,016 KB
testcase_13 AC 49 ms
61,348 KB
testcase_14 AC 52 ms
63,276 KB
testcase_15 AC 49 ms
61,408 KB
testcase_16 AC 48 ms
61,020 KB
testcase_17 AC 53 ms
63,352 KB
testcase_18 AC 47 ms
60,496 KB
testcase_19 AC 49 ms
61,976 KB
testcase_20 AC 48 ms
60,876 KB
testcase_21 AC 52 ms
63,344 KB
testcase_22 AC 52 ms
62,780 KB
testcase_23 AC 52 ms
62,704 KB
testcase_24 AC 50 ms
62,216 KB
testcase_25 AC 49 ms
60,800 KB
testcase_26 AC 51 ms
63,300 KB
testcase_27 AC 49 ms
61,380 KB
testcase_28 AC 48 ms
60,648 KB
testcase_29 AC 49 ms
62,396 KB
testcase_30 AC 51 ms
61,988 KB
testcase_31 AC 50 ms
62,664 KB
testcase_32 AC 49 ms
61,976 KB
testcase_33 AC 52 ms
63,540 KB
testcase_34 AC 48 ms
60,716 KB
testcase_35 AC 48 ms
60,972 KB
testcase_36 AC 49 ms
61,424 KB
testcase_37 AC 54 ms
63,152 KB
testcase_38 AC 47 ms
60,796 KB
testcase_39 AC 47 ms
60,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A, B, C = map(int, input().split())

discount = [0 for _ in range(N+1)]
for i in range(1,N+1):
    if i>=3:
        discount[i] = max(discount[i], discount[i-3] + A)
    if i>=5:
        discount[i] = max(discount[i], discount[i-5] + B)
    if i>=10:
        discount[i] = max(discount[i], discount[i-10] + C)
print(max(discount))
0