結果

問題 No.928 軽減税率?
ユーザー IKyopro
提出日時 2019-11-22 23:19:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 725 ms
コンパイル使用メモリ 69,860 KB
最終ジャッジ日時 2025-01-08 05:22:35
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
template<class T> using vec = vector<T>;
template<class T> using vvec = vector<vec<T>>;

int main(){
    ll P,Q,A;
    cin >> P >> Q >> A;
    if(P<Q || (P==Q && A!=0)){
        cout << 1000000000 << endl;
        return 0;
    }
    if(P==Q && A==0){
        cout << 0 << endl;
        return 0;
    }
    int ans = 0;
    for(int m=1;m<=1e7;m++){
        ll s = (100+P)*m/100,t = (100+Q)*m/100+A;
        ans += s<t;
    }
    cout << ans << endl;
}
0