結果

問題 No.1517 Party Location
ユーザー 👑 H20H20
提出日時 2021-05-28 21:14:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 124 bytes
コンパイル時間 869 ms
コンパイル使用メモリ 86,428 KB
実行使用メモリ 75,584 KB
最終ジャッジ日時 2023-09-02 04:10:37
合計ジャッジ時間 2,436 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,048 KB
testcase_01 AC 74 ms
71,180 KB
testcase_02 AC 145 ms
75,228 KB
testcase_03 AC 77 ms
75,284 KB
testcase_04 AC 77 ms
75,380 KB
testcase_05 AC 77 ms
75,564 KB
testcase_06 AC 76 ms
75,252 KB
testcase_07 AC 72 ms
71,288 KB
testcase_08 AC 76 ms
75,224 KB
testcase_09 AC 75 ms
75,584 KB
testcase_10 AC 76 ms
75,488 KB
testcase_11 AC 76 ms
75,284 KB
testcase_12 AC 80 ms
70,948 KB
testcase_13 AC 77 ms
75,220 KB
testcase_14 AC 76 ms
75,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a,b = map(int, input().split())
ans = 10**10
for i in range(d+1):
    ans = min(ans,i*a+(d-i)*b)
print(ans)
0