結果

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

ソースコード

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;
    int ans = 0;
    for(int m=1;m<=100*(A+1);m++){
        ll s = (100+P)*m/100,t = (100+Q)*m/100+A;
        ans += s<t;
    }
    ll inf = 1e9;
    if((100+P)*inf/100<(100+Q)*inf/100+A){
        ans += inf-100*(A+1);
    }
    cout << ans << endl;
}
0