結果

問題 No.928 軽減税率?
ユーザー QCFium
提出日時 2019-11-22 21:51:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 492 bytes
コンパイル時間 1,577 ms
コンパイル使用メモリ 166,508 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-11 03:21:17
合計ジャッジ時間 7,361 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 (p <= q && a) {
		std::cout << 1000000000 << std::endl;
		return 0;
	} else if (p == q) {
		std::cout << 0 << std::endl;
		return 0;
	}
	int res = 0;
	for (int i = 1; i < 50000000; i++) {
		if ((int) (i * (1 + (double) p / 100) + 0.00000000001) < a + (int) (i * (1 + (double) q / 100) + 0.00000000001)) res++;
	}
	std::cout << res << std::endl;
	return 0;
}
0