結果

問題 No.2386 Udon Coupon (Easy)
ユーザー sepa38sepa38
提出日時 2023-07-21 21:26:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,660 KB
実行使用メモリ 53,396 KB
最終ジャッジ日時 2023-10-21 21:13:58
合計ジャッジ時間 2,935 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
53,376 KB
testcase_01 AC 40 ms
53,376 KB
testcase_02 AC 39 ms
53,376 KB
testcase_03 AC 39 ms
53,376 KB
testcase_04 AC 38 ms
53,376 KB
testcase_05 AC 38 ms
53,376 KB
testcase_06 AC 39 ms
53,376 KB
testcase_07 AC 40 ms
53,376 KB
testcase_08 AC 40 ms
53,376 KB
testcase_09 AC 38 ms
53,376 KB
testcase_10 AC 39 ms
53,376 KB
testcase_11 AC 38 ms
53,376 KB
testcase_12 WA -
testcase_13 AC 39 ms
53,376 KB
testcase_14 AC 39 ms
53,376 KB
testcase_15 AC 40 ms
53,376 KB
testcase_16 AC 40 ms
53,376 KB
testcase_17 AC 40 ms
53,376 KB
testcase_18 AC 40 ms
53,376 KB
testcase_19 AC 39 ms
53,376 KB
testcase_20 WA -
testcase_21 AC 38 ms
53,376 KB
testcase_22 AC 39 ms
53,376 KB
testcase_23 AC 40 ms
53,376 KB
testcase_24 AC 39 ms
53,376 KB
testcase_25 AC 38 ms
53,376 KB
testcase_26 AC 39 ms
53,376 KB
testcase_27 AC 40 ms
53,376 KB
testcase_28 AC 40 ms
53,376 KB
testcase_29 AC 39 ms
53,376 KB
testcase_30 AC 40 ms
53,376 KB
testcase_31 AC 38 ms
53,376 KB
testcase_32 AC 38 ms
53,376 KB
testcase_33 AC 39 ms
53,376 KB
testcase_34 AC 39 ms
53,376 KB
testcase_35 AC 39 ms
53,376 KB
testcase_36 WA -
testcase_37 AC 41 ms
53,376 KB
testcase_38 AC 40 ms
53,376 KB
testcase_39 AC 40 ms
53,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a, b, c = map(int, input().split())
m = max(a*10, b*6, c*3)
ans = n // 30 * m
n %= 30
tmp = 0
for i in range(n//3+1):
  for j in range((n-i*3)//5+1):
    k = (n - i * 3 - j * 5) // 10
    tmp = max(tmp, i*a+j*b+k*c)
ans += tmp
print(ans)
0