結果

問題 No.2259 Gas Station
ユーザー ThetaTheta
提出日時 2023-04-21 14:23:57
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 381 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 80,896 KB
最終ジャッジ日時 2024-04-24 02:54:46
合計ジャッジ時間 4,475 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
57,344 KB
testcase_01 AC 37 ms
51,968 KB
testcase_02 AC 37 ms
51,712 KB
testcase_03 AC 37 ms
51,712 KB
testcase_04 AC 37 ms
51,456 KB
testcase_05 AC 38 ms
51,968 KB
testcase_06 AC 39 ms
51,712 KB
testcase_07 AC 40 ms
51,584 KB
testcase_08 AC 41 ms
51,968 KB
testcase_09 AC 39 ms
51,584 KB
testcase_10 AC 39 ms
51,840 KB
testcase_11 AC 37 ms
51,712 KB
testcase_12 AC 38 ms
51,584 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