結果

問題 No.1517 Party Location
ユーザー 163x bee.163x bee.
提出日時 2021-07-20 23:43:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 8,848 KB
最終ジャッジ日時 2023-09-02 04:15:25
合計ジャッジ時間 1,206 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,756 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 AC 18 ms
8,836 KB
testcase_03 AC 16 ms
8,240 KB
testcase_04 AC 17 ms
8,228 KB
testcase_05 AC 16 ms
7,824 KB
testcase_06 AC 16 ms
8,292 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 AC 17 ms
8,296 KB
testcase_09 AC 18 ms
8,652 KB
testcase_10 AC 19 ms
8,732 KB
testcase_11 AC 19 ms
8,492 KB
testcase_12 AC 16 ms
7,888 KB
testcase_13 AC 19 ms
8,848 KB
testcase_14 AC 18 ms
8,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a, b =map(int, input().split())

x_list =list(range(0, d + 1))

ans_list = []

for x in range(len(x_list)):
    ans = x * a + (d - x) * b
    ans_list.append(ans)

print(min(ans_list))
0