結果
問題 | No.2259 Gas Station |
ユーザー |
|
提出日時 | 2023-04-07 21:27:34 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 45 ms / 2,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 545 ms |
コンパイル使用メモリ | 82,312 KB |
実行使用メモリ | 54,912 KB |
最終ジャッジ日時 | 2024-10-02 19:00:31 |
合計ジャッジ時間 | 2,288 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import syssys.setrecursionlimit(5*10**5)input = sys.stdin.readlinefrom collections import defaultdict, deque, Counterfrom heapq import heappop, heappushfrom bisect import bisect_left, bisect_rightfrom math import gcdl,r,c = map(int,input().split())ans = float("inf")for i in range(l, min(r, l+1000)+1):if c * i % 1000 == 0:print(0)breaktmp = 1000 - c * i % 1000ans = min(ans, tmp)else:print(ans)