結果
| 問題 |
No.2386 Udon Coupon (Easy)
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 21:59:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 478 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 82,332 KB |
| 実行使用メモリ | 62,696 KB |
| 最終ジャッジ日時 | 2025-04-15 22:00:48 |
| 合計ジャッジ時間 | 3,075 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 10 |
ソースコード
n = int(input())
a, b, c = map(int, input().split())
max_total = 0
max_x = n // 10
for x in range(max_x + 1):
rem = n - 10 * x
if rem < 0:
continue
y_max = rem // 5
start_y = max(0, y_max - 4)
for y in range(start_y, y_max + 1):
if 5 * y > rem:
continue
rem_after = rem - 5 * y
z = rem_after // 3
total = c * x + b * y + a * z
if total > max_total:
max_total = total
print(max_total)
lam6er