結果
問題 | No.2386 Udon Coupon (Easy) |
ユーザー | rlangevin |
提出日時 | 2023-07-21 21:35:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 59 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 62,208 KB |
最終ジャッジ日時 | 2024-09-21 22:54:24 |
合計ジャッジ時間 | 3,544 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
N = int(input()) A, B, C = map(int, input().split()) ans = N//300 * max(A * 10, B * 6, C * 3) * 10 N %= 300 temp = 0 for a in range(110): for b in range(70): for c in range(40): if 3 * a + 5 * b + 10 * c > N: continue temp = max(temp, A * a + B * b + C * c) print(ans + temp)