結果

問題 No.2259 Gas Station
ユーザー cologne
提出日時 2023-08-05 13:09:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 57,856 KB
最終ジャッジ日時 2024-10-15 10:14:50
合計ジャッジ時間 2,116 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def input(): return sys.stdin.readline().rstrip()


def main():
    L, R, C = map(int, input().split())
    R = min(R, L+2000)
    z = 999
    for i in range(L, R+1):
        z = min(z, -i*C % 1000)
    print(z)


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