結果

問題 No.928 軽減税率?
ユーザー tempura_pptempura_pp
提出日時 2019-11-22 21:48:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 975 bytes
コンパイル時間 1,117 ms
コンパイル使用メモリ 96,260 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-19 10:59:26
合計ジャッジ時間 16,586 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 503 ms
5,248 KB
testcase_01 AC 503 ms
6,948 KB
testcase_02 AC 249 ms
5,376 KB
testcase_03 AC 249 ms
5,376 KB
testcase_04 AC 497 ms
5,376 KB
testcase_05 AC 508 ms
5,376 KB
testcase_06 AC 510 ms
5,376 KB
testcase_07 AC 500 ms
5,376 KB
testcase_08 AC 513 ms
5,376 KB
testcase_09 AC 496 ms
5,376 KB
testcase_10 AC 496 ms
5,376 KB
testcase_11 AC 494 ms
5,376 KB
testcase_12 AC 492 ms
5,376 KB
testcase_13 AC 498 ms
5,376 KB
testcase_14 AC 494 ms
5,376 KB
testcase_15 AC 500 ms
5,376 KB
testcase_16 AC 498 ms
5,376 KB
testcase_17 AC 491 ms
5,376 KB
testcase_18 AC 495 ms
5,376 KB
testcase_19 AC 493 ms
5,376 KB
testcase_20 AC 495 ms
5,376 KB
testcase_21 AC 492 ms
5,376 KB
testcase_22 AC 493 ms
5,376 KB
testcase_23 AC 250 ms
5,376 KB
testcase_24 AC 253 ms
5,376 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 500 ms
5,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
    ll p,q,a;
    cin>>p>>q>>a;
    ll ok = 0, ng = 1e9+1;
    while(ng-ok>1){
        ll mid = (ok+ng)/2;
        ll in = (100+p)*mid/100;
        ll out = (100+q)*mid/100+a;
        if(in<out)ok=mid;
        else ng = mid;
    }
    ok -= 100000000;
    ok=max(0ll,ok);
    int ans = ok;
    REP(i,1,200000000){
        if(ok+i>1e9)break;
        ll in = (100+p)*(ok+i)/100;
        ll out = (100+q)*(ok+i)/100+a;
        if(in<out)++ans;
    }
    cout<<ans<<endl;
    return 0;
}
0