結果

問題 No.2386 Udon Coupon (Easy)
ユーザー とろちゃとろちゃ
提出日時 2023-07-21 21:31:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 842 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 81,796 KB
実行使用メモリ 67,624 KB
最終ジャッジ日時 2023-10-21 21:21:38
合計ジャッジ時間 3,773 ms
ジャッジサーバーID
(参考情報)
judge9 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,512 KB
testcase_01 WA -
testcase_02 AC 36 ms
53,512 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 34 ms
53,512 KB
testcase_06 AC 37 ms
53,512 KB
testcase_07 AC 52 ms
67,600 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 45 ms
62,104 KB
testcase_12 AC 51 ms
65,020 KB
testcase_13 AC 51 ms
65,352 KB
testcase_14 AC 53 ms
65,288 KB
testcase_15 AC 51 ms
65,340 KB
testcase_16 AC 48 ms
64,952 KB
testcase_17 WA -
testcase_18 AC 45 ms
62,380 KB
testcase_19 WA -
testcase_20 AC 48 ms
65,016 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 51 ms
64,940 KB
testcase_26 AC 55 ms
65,312 KB
testcase_27 AC 55 ms
67,568 KB
testcase_28 AC 47 ms
62,532 KB
testcase_29 AC 47 ms
62,360 KB
testcase_30 AC 46 ms
61,940 KB
testcase_31 WA -
testcase_32 AC 43 ms
61,940 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 49 ms
65,112 KB
testcase_36 AC 51 ms
65,356 KB
testcase_37 AC 50 ms
65,152 KB
testcase_38 AC 46 ms
62,680 KB
testcase_39 AC 46 ms
62,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
# from collections import *
# from heapq import *
# from itertools import *
# from math import *
# from datetime import *
# from decimal import *  # PyPyだと遅い
# from string import ascii_lowercase,ascii_uppercase
# import numpy as np
import sys

# sys.setrecursionlimit(10**6) # PyPyだと遅い
INF = 10**18
MOD = 998244353
# MOD = 10**9 + 7
File = sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////


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

dp = [-1] * (N + 1)
dp[0] = 0
l = [(3, A), (5, B), (10, C)]
for i in range(1, N + 1):
    for j, k in l:
        if i - j >= 0 and dp[i - j] != -1:
            dp[i] = max(dp[i], dp[i - j] + k)

print(dp[N])
0