結果

問題 No.2386 Udon Coupon (Easy)
ユーザー ShirotsumeShirotsume
提出日時 2023-07-21 21:23:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 81,780 KB
実行使用メモリ 67,700 KB
最終ジャッジ日時 2023-10-21 21:10:05
合計ジャッジ時間 3,920 ms
ジャッジサーバーID
(参考情報)
judge9 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
56,208 KB
testcase_01 AC 42 ms
56,208 KB
testcase_02 AC 44 ms
56,208 KB
testcase_03 AC 43 ms
56,208 KB
testcase_04 AC 43 ms
56,208 KB
testcase_05 AC 42 ms
56,208 KB
testcase_06 AC 43 ms
56,208 KB
testcase_07 AC 56 ms
66,048 KB
testcase_08 AC 43 ms
56,208 KB
testcase_09 AC 43 ms
56,208 KB
testcase_10 AC 52 ms
64,844 KB
testcase_11 AC 50 ms
64,496 KB
testcase_12 AC 50 ms
63,444 KB
testcase_13 AC 50 ms
63,776 KB
testcase_14 AC 55 ms
65,772 KB
testcase_15 AC 51 ms
63,768 KB
testcase_16 AC 49 ms
63,376 KB
testcase_17 AC 54 ms
65,848 KB
testcase_18 AC 49 ms
62,852 KB
testcase_19 AC 51 ms
64,472 KB
testcase_20 AC 51 ms
65,360 KB
testcase_21 AC 57 ms
65,852 KB
testcase_22 AC 58 ms
67,328 KB
testcase_23 AC 57 ms
67,252 KB
testcase_24 AC 53 ms
64,708 KB
testcase_25 AC 52 ms
65,284 KB
testcase_26 AC 54 ms
65,796 KB
testcase_27 AC 54 ms
65,864 KB
testcase_28 AC 50 ms
63,004 KB
testcase_29 AC 52 ms
64,892 KB
testcase_30 AC 56 ms
66,536 KB
testcase_31 AC 53 ms
65,160 KB
testcase_32 AC 52 ms
64,472 KB
testcase_33 AC 54 ms
66,036 KB
testcase_34 AC 49 ms
63,076 KB
testcase_35 AC 51 ms
65,456 KB
testcase_36 AC 53 ms
65,976 KB
testcase_37 AC 57 ms
67,700 KB
testcase_38 AC 51 ms
63,152 KB
testcase_39 AC 50 ms
62,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

n = ii()

a, b, c = mi()

dp = [0] * (n + 100)

for i in range(n):
    dp[i + 3] = max(dp[i] + a, dp[i + 3])
    dp[i + 5] = max(dp[i] + b, dp[i + 5])
    dp[i + 10] = max(dp[i] + c, dp[i + 10])

print(dp[n])
0