結果

問題 No.928 軽減税率?
コンテスト
ユーザー wunderkammer2
提出日時 2020-01-29 13:42:03
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 834 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 526 ms
コンパイル使用メモリ 106,436 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-05 04:51:35
合計ジャッジ時間 1,784 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;

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

	cout << count << endl;

	return 0;
}
0