結果

問題 No.2259 Gas Station
ユーザー pyt-314pyt-314
提出日時 2023-05-14 19:29:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,508 KB
最終ジャッジ日時 2023-08-20 06:22:18
合計ジャッジ時間 3,613 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,228 KB
testcase_01 AC 84 ms
71,328 KB
testcase_02 AC 87 ms
71,356 KB
testcase_03 AC 86 ms
71,360 KB
testcase_04 AC 85 ms
71,280 KB
testcase_05 AC 84 ms
71,000 KB
testcase_06 AC 87 ms
71,316 KB
testcase_07 AC 89 ms
71,224 KB
testcase_08 AC 86 ms
71,000 KB
testcase_09 AC 85 ms
71,416 KB
testcase_10 AC 85 ms
71,364 KB
testcase_11 AC 85 ms
71,144 KB
testcase_12 AC 87 ms
71,312 KB
testcase_13 AC 85 ms
71,444 KB
testcase_14 AC 87 ms
71,492 KB
testcase_15 AC 87 ms
71,424 KB
testcase_16 AC 85 ms
71,360 KB
testcase_17 AC 87 ms
71,008 KB
testcase_18 AC 85 ms
71,508 KB
testcase_19 AC 90 ms
71,224 KB
testcase_20 AC 87 ms
71,224 KB
testcase_21 AC 85 ms
71,456 KB
testcase_22 AC 88 ms
71,404 KB
testcase_23 AC 85 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mins = 0
l, r, c = map(int, input().split())

sc = float("inf")
for i in range(min(r - l + 1,1000)):
    sc = min((1000 - ((l + i) * c) % 1000) % 1000, sc)
print(sc)
0