結果

問題 No.928 軽減税率?
ユーザー QCFium
提出日時 2019-11-22 21:44:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 1,592 ms
コンパイル使用メモリ 167,780 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-11 03:11:43
合計ジャッジ時間 4,549 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int p = ri(), q = ri();
	int a = ri();
	if (a == 0) {
		std::cout << 0 << std::endl;
		return 0;
	}
	if (p <= q) {
		std::cout << 1000000000 << std::endl;
		return 0;
	}
	int res = 0;
	for (int i = 1; i < 50000000; i++) {
		if ((int) (i * (1 + (double) p / 100)) < a + (int) (i * (1 + (double) q / 100))) res++;
	}
	std::cout << res << std::endl;
	return 0;
}
0