結果

問題 No.928 軽減税率?
ユーザー ks2mks2m
提出日時 2019-11-22 23:28:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 1,903 ms
コンパイル使用メモリ 74,160 KB
実行使用メモリ 55,964 KB
最終ジャッジ日時 2024-04-19 12:39:45
合計ジャッジ時間 6,948 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
41,172 KB
testcase_01 AC 114 ms
41,160 KB
testcase_02 AC 101 ms
40,920 KB
testcase_03 AC 95 ms
41,200 KB
testcase_04 AC 112 ms
41,288 KB
testcase_05 AC 102 ms
41,320 KB
testcase_06 AC 117 ms
41,468 KB
testcase_07 AC 115 ms
41,016 KB
testcase_08 AC 96 ms
41,200 KB
testcase_09 AC 112 ms
41,316 KB
testcase_10 AC 117 ms
41,072 KB
testcase_11 AC 97 ms
41,452 KB
testcase_12 AC 105 ms
41,076 KB
testcase_13 AC 115 ms
41,200 KB
testcase_14 AC 111 ms
41,200 KB
testcase_15 AC 117 ms
41,716 KB
testcase_16 AC 95 ms
41,296 KB
testcase_17 AC 114 ms
39,916 KB
testcase_18 AC 117 ms
41,136 KB
testcase_19 AC 132 ms
41,200 KB
testcase_20 AC 132 ms
41,184 KB
testcase_21 AC 118 ms
41,112 KB
testcase_22 WA -
testcase_23 AC 114 ms
41,332 KB
testcase_24 AC 101 ms
41,168 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		double p = sc.nextInt();
		double q = sc.nextInt();
		int a = sc.nextInt();
		sc.close();

		if (p <= q) {
			System.out.println(1000000000);
		} else {
			int max = (int) (100 * a / (p - q));
			int ans = 0;
			for (int i = max; i > 0; i--) {
				int x = (int) ((100 + p) * i / 100);
				int y = (int) ((100 + q) * i / 100);
				if (x < y + a) {
					ans++;
				}
			}
			System.out.println(ans);
		}
	}
}
0