結果
問題 |
No.928 軽減税率?
|
ユーザー |
|
提出日時 | 2019-11-22 22:28:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 620 bytes |
コンパイル時間 | 826 ms |
コンパイル使用メモリ | 82,336 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-11 04:13:20 |
合計ジャッジ時間 | 1,790 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 WA * 10 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <set> #include <math.h> using namespace std; typedef long long int ll; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll p,q,a; cin >> p >> q >> a; ll left=0,right=1e9+1; while(right-left>1){ ll mid=(left+right)/2; if((100+p)*mid/100<(100+q)*mid/100+a){ left=mid; } else{ right=mid; } } ll ans=left-min(left,10000LL); for(ll i=left-min(left,10000LL)+1;i<left-min(left,100LL)+100000;i++){ if(i>1e9)break; if((100+p)*i/100<(100+q)*i/100+a){ ans++; } } cout << ans << endl; }