結果
| 問題 |
No.2259 Gas Station
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2023-04-15 14:15:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 203 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 53,776 KB |
| 最終ジャッジ日時 | 2024-10-11 01:16:25 |
| 合計ジャッジ時間 | 2,230 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
L,R,C=map(int,input().split())
D={}
ans=1000
for x in range(L,R+1):
d=x*C%1000
if d==0:
print(0)
exit()
d=1000-d
if d not in D:
D[d]=1
ans=min(ans,d)
else:
break
print(ans)
timi