結果

問題 No.2386 Udon Coupon (Easy)
ユーザー 👑 p-adicp-adic
提出日時 2023-07-21 21:40:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 10,036 KB
最終ジャッジ日時 2023-10-21 21:35:57
合計ジャッジ時間 5,216 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,036 KB
testcase_01 AC 28 ms
10,036 KB
testcase_02 AC 29 ms
10,036 KB
testcase_03 AC 28 ms
10,036 KB
testcase_04 AC 29 ms
10,036 KB
testcase_05 AC 28 ms
10,036 KB
testcase_06 AC 29 ms
10,036 KB
testcase_07 AC 169 ms
10,036 KB
testcase_08 AC 29 ms
10,036 KB
testcase_09 AC 29 ms
10,036 KB
testcase_10 AC 62 ms
10,036 KB
testcase_11 AC 44 ms
10,036 KB
testcase_12 AC 133 ms
10,036 KB
testcase_13 AC 163 ms
10,036 KB
testcase_14 AC 146 ms
10,036 KB
testcase_15 AC 162 ms
10,036 KB
testcase_16 AC 130 ms
10,036 KB
testcase_17 AC 150 ms
10,036 KB
testcase_18 AC 79 ms
10,036 KB
testcase_19 AC 39 ms
10,036 KB
testcase_20 AC 121 ms
10,036 KB
testcase_21 AC 152 ms
10,036 KB
testcase_22 AC 99 ms
10,036 KB
testcase_23 AC 91 ms
10,036 KB
testcase_24 AC 50 ms
10,036 KB
testcase_25 AC 114 ms
10,036 KB
testcase_26 AC 146 ms
10,036 KB
testcase_27 AC 165 ms
10,036 KB
testcase_28 AC 95 ms
10,036 KB
testcase_29 AC 65 ms
10,036 KB
testcase_30 AC 37 ms
10,036 KB
testcase_31 AC 90 ms
10,036 KB
testcase_32 AC 39 ms
10,036 KB
testcase_33 AC 166 ms
10,036 KB
testcase_34 AC 101 ms
10,036 KB
testcase_35 AC 128 ms
10,036 KB
testcase_36 AC 163 ms
10,036 KB
testcase_37 AC 133 ms
10,036 KB
testcase_38 AC 109 ms
10,036 KB
testcase_39 AC 83 ms
10,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,P=input,range,print
def J():
	return map(int,I().split())
N=int(I())
A,B,C=J()
d=0
for c in R(N//10+1):
	n=N-c*10
	for b in R(min(3,n//5+1)):
		m=n-b*5
		d=max(d,c*C+b*B+(m//3)*A)
	for a in R(min(5,n//3+1)):
		m=n-a*3
		d=max(d,c*C+(m//5)*B+a*A)
P(d)
0