結果

問題 No.2259 Gas Station
ユーザー ceshinidema
提出日時 2023-04-19 20:46:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 1,665 ms
コンパイル使用メモリ 167,352 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-14 23:11:44
合計ジャッジ時間 2,470 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#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(ll 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;
}
0