結果
| 問題 |
No.2259 Gas Station
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-07 23:15:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 460 bytes |
| コンパイル時間 | 1,552 ms |
| コンパイル使用メモリ | 165,740 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-02 20:26:26 |
| 合計ジャッジ時間 | 2,296 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 7 |
ソースコード
#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;
if(L/1000==0 && R/1000==0){
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;
}else cout << 0 << endl;
return 0;
}