結果
| 問題 |
No.2259 Gas Station
|
| コンテスト | |
| ユーザー |
galarririnbaru
|
| 提出日時 | 2023-04-15 09:14:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| コンパイル時間 | 1,479 ms |
| コンパイル使用メモリ | 165,684 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 21:56:13 |
| 合計ジャッジ時間 | 10,599 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
double pi=3.141592653589793;
int main() {
int L, R, ans=1000, C;
cin >> L >> R >> C;
for (int i=L; i<=R; i++) {
if (i*C%1000==0) {
ans=0;
}
else if (1000-(i*C%1000)<ans) {
ans=1000-(i*C%1000);
}
}
cout << ans;
}
galarririnbaru