結果

問題 No.928 軽減税率?
ユーザー wunderkammer2wunderkammer2
提出日時 2020-01-29 13:43:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 890 bytes
コンパイル時間 880 ms
コンパイル使用メモリ 90,928 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-10-14 05:37:46
合計ジャッジ時間 2,382 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<algorithm>
#include<cmath>
#include<cstdio>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<string>
#include<utility>
#include<vector>

using namespace std;
typedef long long ll;
const ll mod = 1000000007;
#define rep(i,n) for(int i=0;i<n;i++)
#define repl(i,s,e) for(int i=s;i<e;i++)
#define reple(i,s,e) for(int i=s;i<=e;i++)
#define revrep(i,n) for(int i=n-1;i>=0;i--)
#define all(x) (x).begin(),(x).end()

ll P, Q, A;

bool C(ll x)
{
	ll eatin = (100 + P) * x / 100;
	ll takeout = ((100 + Q) * x / 100) + (ll)A;

	//逆の条件
	return eatin < takeout;
}

int main()
{	
	const int MAX_N = 1000000000;

	cin >> P >> Q >> A;

	if (P < Q)
	{
		cout << MAX_N << endl;
		return 0;
	}

	//全探索の範囲を絞る
	ll count = 0;
	reple(i, 1, 1000000)
	{
		if (C(i)) count++;
	}

	cout << count << endl;

	return 0;
}
0