結果

問題 No.928 軽減税率?
ユーザー ngtkana
提出日時 2020-03-28 13:16:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 192,928 KB
最終ジャッジ日時 2025-01-09 10:41:27
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 8 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using lint=long long;
using real=long double;
int main(){
    std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
    std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
    lint p,q,a;std::cin>>p>>q>>a;
    if(p<=q){
        std::cout<<(p==q&&a?1'000'000'000:0)<<'\n';
        return 0;
    }
    lint x=((a+p-q-1)/(p-q)-1)*100;
    for(;p*x/100<q*x/100+a;x++);
    std::cout<<x-1<<'\n';
}
0