結果

問題 No.928 軽減税率?
ユーザー 37zigen37zigen
提出日時 2019-11-22 22:25:37
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 718 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 74,648 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2024-04-19 11:55:51
合計ジャッジ時間 6,901 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
41,724 KB
testcase_01 AC 118 ms
41,500 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 121 ms
41,440 KB
testcase_05 AC 118 ms
41,520 KB
testcase_06 AC 115 ms
40,024 KB
testcase_07 AC 116 ms
40,252 KB
testcase_08 AC 113 ms
41,368 KB
testcase_09 AC 127 ms
41,100 KB
testcase_10 AC 114 ms
41,544 KB
testcase_11 AC 113 ms
41,356 KB
testcase_12 AC 107 ms
41,888 KB
testcase_13 AC 114 ms
41,316 KB
testcase_14 AC 103 ms
41,468 KB
testcase_15 AC 103 ms
41,512 KB
testcase_16 AC 117 ms
41,336 KB
testcase_17 AC 109 ms
41,220 KB
testcase_18 AC 106 ms
41,520 KB
testcase_19 AC 111 ms
41,780 KB
testcase_20 AC 112 ms
41,864 KB
testcase_21 AC 115 ms
41,264 KB
testcase_22 AC 111 ms
41,556 KB
testcase_23 RE -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 115 ms
41,424 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;
import java.io.*;

class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        long P = sc.nextLong();
        long Q = sc.nextLong();
        long A = sc.nextLong();
        if (P < Q) {
            System.out.println(1e9);
            return;
        }
        if (A == 0) {
            System.out.println(0);
            return;
        }
        long ans = Math.max(0, (A - 1) * 100 / (P - Q) - 1);
        for (long x = Math.max(1, (A - 1) * 100 / (P - Q)); x <= (A + 1) * 100 / (P - Q); ++x) {
            if ((P + 100) * x / 100  < (Q + 100) * x / 100 + A ) ++ans;
        }
        System.out.println(ans);
    }
}
0