結果
| 問題 |
No.2099 [Cherry Alpha B] Time Machine
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-14 21:31:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 818 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 82,588 KB |
| 実行使用メモリ | 75,648 KB |
| 最終ジャッジ日時 | 2024-06-26 13:15:25 |
| 合計ジャッジ時間 | 26,622 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 66 WA * 6 |
ソースコード
def main():
from sys import stdin, setrecursionlimit
# setrecursionlimit(1000000)
input = stdin.readline
def iinput(): return int(input())
def sinput(): return input().rstrip()
def i0input(): return int(input()) - 1
def linput(): return list(input().split())
def liinput(): return list(map(int, input().split()))
def miinput(): return map(int, input().split())
def li0input(): return list(map(lambda x: int(x) - 1, input().split()))
def mi0input(): return map(lambda x: int(x) - 1, input().split())
INF = 1000000000000000000
MOD = 1000000007
T = iinput()
X, A = miinput()
Y, B = miinput()
ans = INF
for i in range(10000000):
Z = T + B * i
if Z >= 0:
ans = min(ans, Z // A * X + i * Y + Z % A)
print(ans)
main()