結果
| 問題 |
No.2259 Gas Station
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2023-04-15 07:58:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 291 bytes |
| コンパイル時間 | 488 ms |
| コンパイル使用メモリ | 64,936 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 21:01:17 |
| 合計ジャッジ時間 | 1,488 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
#define int long long
using namespace std;
int l, r, c;
signed main() {
int i;
cin >> l >> r >> c;
int ans = 999;
for (i = l; i <= min(r, l + 1000); i++) {
int score = (1000 - c * i % 1000) % 1000;
ans = min(ans, score);
}
cout << ans << endl;
return 0;
}
startcpp