結果
| 問題 |
No.1517 Party Location
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-28 20:23:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 778 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-11 10:49:30 |
| 合計ジャッジ時間 | 1,069 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
import sys
sys.setrecursionlimit(1000000)
def debug(*args, **kwargs):
import os
if os.getenv('DEBUG'): print(*args, **kwargs, file=sys.stderr)
def input():
return sys.stdin.readline()[:-1]
def int0(s: str) -> int:
return int(s) - 1
def main(_=0):
d = int(input())
a, b = map(int, input().split())
ans = 1001001001
for x in range(d+1):
ans = min(ans, x * a + (d - x) * b)
print(ans)
def as_input(s: str) -> None:
import io
global input
f = io.StringIO(s)
input = lambda: f.readline().rstrip()
return None
sample1 = """10
20 20
"""
sample2 = """5
0 100
"""
def test():
"""
>>> main(as_input(sample1))
200
>>> main(as_input(sample2))
0
"""
pass
if __name__ == '__main__':
main()