結果

問題 No.2386 Udon Coupon (Easy)
ユーザー titiatitia
提出日時 2023-07-21 21:32:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 310 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 11,912 KB
実行使用メモリ 19,392 KB
最終ジャッジ日時 2023-10-21 21:23:42
合計ジャッジ時間 7,419 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,036 KB
testcase_01 AC 24 ms
10,036 KB
testcase_02 AC 25 ms
10,044 KB
testcase_03 AC 25 ms
10,036 KB
testcase_04 AC 25 ms
10,036 KB
testcase_05 AC 23 ms
10,036 KB
testcase_06 AC 25 ms
10,044 KB
testcase_07 AC 300 ms
19,392 KB
testcase_08 AC 24 ms
10,036 KB
testcase_09 AC 24 ms
10,036 KB
testcase_10 AC 96 ms
12,000 KB
testcase_11 AC 55 ms
10,944 KB
testcase_12 AC 240 ms
17,016 KB
testcase_13 AC 299 ms
18,864 KB
testcase_14 AC 269 ms
17,808 KB
testcase_15 AC 303 ms
18,864 KB
testcase_16 AC 219 ms
16,488 KB
testcase_17 AC 282 ms
18,072 KB
testcase_18 AC 131 ms
13,320 KB
testcase_19 AC 43 ms
10,572 KB
testcase_20 AC 218 ms
15,960 KB
testcase_21 AC 268 ms
18,072 KB
testcase_22 AC 173 ms
14,640 KB
testcase_23 AC 158 ms
14,112 KB
testcase_24 AC 69 ms
11,208 KB
testcase_25 AC 207 ms
15,696 KB
testcase_26 AC 293 ms
17,808 KB
testcase_27 AC 310 ms
19,128 KB
testcase_28 AC 164 ms
14,376 KB
testcase_29 AC 100 ms
12,264 KB
testcase_30 AC 39 ms
10,488 KB
testcase_31 AC 155 ms
14,112 KB
testcase_32 AC 45 ms
10,680 KB
testcase_33 AC 293 ms
19,392 KB
testcase_34 AC 167 ms
14,640 KB
testcase_35 AC 228 ms
16,752 KB
testcase_36 AC 301 ms
18,864 KB
testcase_37 AC 225 ms
16,752 KB
testcase_38 AC 181 ms
15,168 KB
testcase_39 AC 136 ms
13,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

DP=[0]*(N+15)

for i in range(N+1):
    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(max(DP[:N+1]))
0