結果
問題 | No.2259 Gas Station |
ユーザー | 🦠みどりむし |
提出日時 | 2023-04-07 21:23:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 1,519 bytes |
コンパイル時間 | 349 ms |
コンパイル使用メモリ | 82,396 KB |
実行使用メモリ | 54,072 KB |
最終ジャッジ日時 | 2024-04-10 16:30:35 |
合計ジャッジ時間 | 1,983 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
53,872 KB |
testcase_01 | AC | 32 ms
52,612 KB |
testcase_02 | AC | 34 ms
52,604 KB |
testcase_03 | AC | 33 ms
52,808 KB |
testcase_04 | AC | 34 ms
52,768 KB |
testcase_05 | AC | 33 ms
53,016 KB |
testcase_06 | AC | 34 ms
53,512 KB |
testcase_07 | AC | 34 ms
52,136 KB |
testcase_08 | AC | 35 ms
52,820 KB |
testcase_09 | AC | 35 ms
52,740 KB |
testcase_10 | AC | 39 ms
53,732 KB |
testcase_11 | AC | 34 ms
53,120 KB |
testcase_12 | AC | 34 ms
52,884 KB |
testcase_13 | AC | 34 ms
53,204 KB |
testcase_14 | AC | 35 ms
52,932 KB |
testcase_15 | AC | 34 ms
53,020 KB |
testcase_16 | AC | 35 ms
53,976 KB |
testcase_17 | AC | 36 ms
52,620 KB |
testcase_18 | AC | 35 ms
53,136 KB |
testcase_19 | AC | 36 ms
54,012 KB |
testcase_20 | AC | 35 ms
53,092 KB |
testcase_21 | AC | 34 ms
52,932 KB |
testcase_22 | AC | 34 ms
53,172 KB |
testcase_23 | AC | 37 ms
54,072 KB |
ソースコード
# @uni_kakurenbo # https://github.com/uni-kakurenbo/competitive-programming-workspace # # CC0 1.0 http://creativecommons.org/publicdomain/zero/1.0/deed.ja # #language PyPy3 # #region template from sys import setrecursionlimit, stdin, stderr, argv def debug(*args, **opts): if argv[-1] == "LOCAL_JUDGE": print(*args, **opts, file=stderr) class istream(): def __init__(self, source = stdin): self.pos = -1 self.buffer = [] self.source = source def one(self): self.pos += 1 if self.pos >= len(self.buffer): self.buffer.extend(self.source.readline().split()) return self.buffer[self.pos] def __call__(self, *types): if len(types) == 0: return str(self.one()) if len(types) == 1: tp, count = types[0], 1 if isinstance(tp, int): tp, count = str, tp if count == 1: return tp(self.one()) else: return tuple(tp(self.one()) for _ in [0] * count) if len(types) == 2 and isinstance(types[1], int): return tuple(types[0](self.one()) for _ in [0] * types[1]) return tuple(map(lambda type: type(self.one()), types)) def line(self, type): return tuple(map(type, self.source.readline().split())) cin = istream() # setrecursionlimit(10**5) #endregion l, r, c = map(int, input().split()) st = set() for x in range(l, r+1): a = (-x * c) % 1000 if a in st: break st.add(a) print(min(st))