結果

問題 No.928 軽減税率?
ユーザー face4
提出日時 2019-11-22 22:22:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 645 ms
コンパイル使用メモリ 64,260 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-11 04:04:57
合計ジャッジ時間 1,780 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
typedef long long ll;

int main(){
    double p, q;
    int a;
    cin >> p >> q >> a;
    if(p == q){
        cout << (a==0 ? 0 : 1000000000) << endl;
        return 0;
    } 
    if(p < q){
        cout << 1000000000-q << endl;
        return 0;
    }
    int ret = 0;
    for(double i = 1; i <= a*100; i++){
        if((int)(i*p/100) - (int)(i*q/100) < a) ret++;
    }
    cout << ret << endl;
    return 0;
}
0