結果
問題 |
No.2259 Gas Station
|
ユーザー |
|
提出日時 | 2023-04-19 20:43:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 1,376 ms |
コンパイル使用メモリ | 165,552 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 23:09:23 |
合計ジャッジ時間 | 2,386 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll L,R,C; cin>>L>>R>>C; int cnt=0; for(int i=L;i<=R;i++) { if(i*C>1000) { cout<<1000-(i-1)*C<<endl; cnt++; break; } } if(!cnt) cout<<1000-R*C<<endl; return 0; }