結果
| 問題 |
No.1517 Party Location
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-28 20:29:49 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 171 bytes |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 57,600 KB |
| 最終ジャッジ日時 | 2024-06-11 10:50:43 |
| 合計ジャッジ時間 | 1,335 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
d = int(input())
a, b = map(int, input().split())
min_cost = float('inf')
for x in range(d+1):
cost = x * a + (d-x) * b
min_cost = min(min_cost, cost)
print(min_cost)