結果
問題 | No.2259 Gas Station |
ユーザー |
|
提出日時 | 2023-04-07 21:34:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 398 bytes |
コンパイル時間 | 1,393 ms |
コンパイル使用メモリ | 166,892 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-10-02 19:05:46 |
合計ジャッジ時間 | 2,129 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<int,int> P;#define REP(i,n) for(int i=0;i<int(n);i++)int main(void){cin.tie(nullptr); ios_base::sync_with_stdio(false);int i,j,k;int L,R,C;cin >> L >> R >> C;int x=1000/C;if(L<=x && x<=R) cout << 1000-C*x << endl;else if(R<x) cout << 1000-C*R << endl;else cout << 1000 << endl;return 0;}