結果
| 問題 | No.2259 Gas Station |
| コンテスト | |
| ユーザー |
shisidor
|
| 提出日時 | 2023-04-07 21:25:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 291 bytes |
| 記録 | |
| コンパイル時間 | 522 ms |
| コンパイル使用メモリ | 66,432 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-10-02 18:57:48 |
| 合計ジャッジ時間 | 9,338 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 10 |
ソースコード
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int l, r, c;
cin >> l >> r >> c;
int res = 1000;
for (int i = l; i <= r; i++) {
res = min(res, 1000 - ((i * c) % 1000));
if (i * c % 1000 == 0) res = 0;
}
cout << res << endl;
}
shisidor