結果

問題 No.928 軽減税率?
ユーザー tentententen
提出日時 2020-12-02 10:09:13
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 557 bytes
コンパイル時間 1,915 ms
コンパイル使用メモリ 71,828 KB
実行使用メモリ 59,460 KB
最終ジャッジ日時 2023-10-11 04:31:20
合計ジャッジ時間 9,664 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,480 KB
testcase_01 WA -
testcase_02 AC 121 ms
55,772 KB
testcase_03 AC 123 ms
55,836 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 123 ms
55,952 KB
testcase_08 AC 120 ms
56,424 KB
testcase_09 WA -
testcase_10 AC 123 ms
55,812 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 123 ms
56,152 KB
testcase_14 AC 123 ms
55,904 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 122 ms
56,084 KB
testcase_23 AC 126 ms
55,784 KB
testcase_24 AC 125 ms
56,068 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 124 ms
56,044 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long p = sc.nextInt();
        long q = sc.nextInt();
        int a = sc.nextInt();
        int left = 0;
        int right = 1000000001;
        while (right - left > 1) {
            int m = (left + right) / 2;
            if ((100 + p) * m / 100 >= (100 + q) * m / 100 + a) {
                right = m;
            } else {
                left = m;
            }
        }
        System.out.println(left);
    }
}
0