結果
| 問題 |
No.2259 Gas Station
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-07 23:15:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 1,440 ms |
| コンパイル使用メモリ | 165,708 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 20:26:29 |
| 合計ジャッジ時間 | 2,199 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int l,r,c;
cin>>l>>r>>c;
int min=1000;
for(int x=l;x<=r;x++){
int a;//おつり
if(c*x%1000==0){
a=0;
min=0;
break;
}else{
a=1000-(c*x%1000);
}
if(a<min){
min=a;
}
}
cout<<min<<endl;
return 0;
}