結果

問題 No.2259 Gas Station
ユーザー ThetaTheta
提出日時 2023-04-21 14:23:57
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 381 bytes
コンパイル時間 875 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 80,280 KB
最終ジャッジ日時 2023-08-06 06:41:26
合計ジャッジ時間 5,587 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
75,880 KB
testcase_01 AC 70 ms
71,196 KB
testcase_02 AC 70 ms
71,228 KB
testcase_03 AC 70 ms
71,288 KB
testcase_04 AC 70 ms
71,388 KB
testcase_05 AC 71 ms
71,244 KB
testcase_06 AC 72 ms
71,388 KB
testcase_07 AC 72 ms
71,336 KB
testcase_08 AC 69 ms
71,340 KB
testcase_09 AC 71 ms
71,004 KB
testcase_10 AC 73 ms
71,340 KB
testcase_11 AC 71 ms
71,368 KB
testcase_12 AC 71 ms
71,236 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    L, R, C = map(int, input().split())
    minimum_change = 1000
    for liter in range(L, R+1):
        rest = C*liter % 1000
        if rest == 0:
            minimum_change = 0
        else:
            minimum_change = min(
                minimum_change,
                1000 - rest
            )
    print(minimum_change)


if __name__ == "__main__":
    main()
0