結果

問題 No.1517 Party Location
ユーザー やでな@競プロ
提出日時 2023-10-10 02:20:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 129 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 82,008 KB
実行使用メモリ 59,644 KB
最終ジャッジ日時 2024-09-13 00:11:42
合計ジャッジ時間 1,575 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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