結果

問題 No.1517 Party Location
ユーザー だれだれ
提出日時 2021-05-28 20:21:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 757 ms
コンパイル使用メモリ 86,540 KB
実行使用メモリ 75,556 KB
最終ジャッジ日時 2023-09-02 04:05:39
合計ジャッジ時間 2,654 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,696 KB
testcase_01 AC 75 ms
71,040 KB
testcase_02 AC 107 ms
75,556 KB
testcase_03 AC 77 ms
75,336 KB
testcase_04 AC 77 ms
75,464 KB
testcase_05 AC 77 ms
75,232 KB
testcase_06 AC 81 ms
75,404 KB
testcase_07 AC 73 ms
71,120 KB
testcase_08 AC 78 ms
75,400 KB
testcase_09 AC 79 ms
75,428 KB
testcase_10 AC 77 ms
75,364 KB
testcase_11 AC 77 ms
75,352 KB
testcase_12 AC 74 ms
71,108 KB
testcase_13 AC 76 ms
75,404 KB
testcase_14 AC 77 ms
75,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

print(ans)
0