結果

問題 No.928 軽減税率?
ユーザー chocopuuchocopuu
提出日時 2019-11-22 22:07:31
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,065 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 164,576 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-08-01 11:58:20
合計ジャッジ時間 3,228 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
4,380 KB
testcase_01 AC 6 ms
4,376 KB
testcase_02 AC 6 ms
4,380 KB
testcase_03 AC 6 ms
4,376 KB
testcase_04 AC 6 ms
4,380 KB
testcase_05 AC 6 ms
4,376 KB
testcase_06 AC 6 ms
4,380 KB
testcase_07 AC 6 ms
4,380 KB
testcase_08 AC 6 ms
4,376 KB
testcase_09 AC 6 ms
4,380 KB
testcase_10 AC 6 ms
4,380 KB
testcase_11 AC 6 ms
4,376 KB
testcase_12 AC 7 ms
4,376 KB
testcase_13 AC 6 ms
4,376 KB
testcase_14 AC 6 ms
4,376 KB
testcase_15 AC 6 ms
4,376 KB
testcase_16 AC 6 ms
4,380 KB
testcase_17 AC 8 ms
4,380 KB
testcase_18 AC 7 ms
4,380 KB
testcase_19 AC 7 ms
4,380 KB
testcase_20 AC 7 ms
4,376 KB
testcase_21 AC 8 ms
4,380 KB
testcase_22 AC 6 ms
4,380 KB
testcase_23 AC 5 ms
4,380 KB
testcase_24 AC 6 ms
4,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 6 ms
4,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,n) for(int i = 0;i < (int)(n);i++)
#define RREP(i,n) for(int i = (int)n-1;i >= 0;i--)
#define FOR(i,s,n) for(int i = s;i < (int)n;i++)
#define RFOR(i,s,n) for(int i = (int)n-1;i >= s;i--)
#define ALL(a) a.begin(),a.end()
#define IN(a, x, b) (a<=x && x<b)
template<class T>inline bool CHMAX(T&a,T b){if(a<b){a = b;return true;}return false;}
template<class T>inline bool CHMIN(T&a,T b){if(a>b){a = b;return true;}return false;}
constexpr long long INF = 1e18;


signed main(){
	int P,Q,A;
	cin>>P>>Q>>A;
	auto f =[&](int x)->bool{
		int mise = (100+P)*x/100;
		int takeout = (100+Q)*x/100+A;
		return mise < takeout;
	};
	int l = 0, r = 1e9 + 1;
	while(r - l > 1){
		int c = (l + r) / 2;
		if(f(c)) l = c;
		else r = c;
	}
	int cand = l - 1000000;
	int ans = max(0ll,cand);
	REP(i,2000000){
		int ni = i + cand + 1;
		if(ni < 1)continue;
		if(ni > 1e9)continue;
		if(f(ni))ans++;
	}
	if(P==0){
		REP(i,200000){
			if(f(i+1)==0){
				ans--;
			}
		}
	}
	cout << max(0ll,ans) << endl;
}
0