結果

問題 No.928 軽減税率?
ユーザー tamatotamato
提出日時 2019-11-22 22:35:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 54,676 KB
最終ジャッジ日時 2024-04-19 12:03:50
合計ジャッジ時間 2,125 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,604 KB
testcase_01 AC 33 ms
53,220 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 31 ms
52,660 KB
testcase_05 AC 32 ms
53,172 KB
testcase_06 AC 32 ms
53,244 KB
testcase_07 AC 32 ms
53,200 KB
testcase_08 AC 30 ms
52,528 KB
testcase_09 AC 31 ms
52,484 KB
testcase_10 AC 31 ms
52,500 KB
testcase_11 AC 30 ms
53,328 KB
testcase_12 AC 31 ms
53,392 KB
testcase_13 AC 31 ms
52,736 KB
testcase_14 AC 31 ms
53,552 KB
testcase_15 AC 30 ms
53,360 KB
testcase_16 AC 31 ms
53,260 KB
testcase_17 AC 32 ms
52,376 KB
testcase_18 AC 32 ms
53,276 KB
testcase_19 AC 31 ms
52,736 KB
testcase_20 AC 31 ms
52,720 KB
testcase_21 AC 31 ms
52,756 KB
testcase_22 AC 30 ms
53,324 KB
testcase_23 WA -
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 31 ms
53,020 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import floor

P, Q, A = map(int, input().split())

if P <= Q:
    print(0)
    exit()

ans = 0
for mod in range(100):
    p = floor(P*mod/100)
    q = floor(Q*mod/100)
    k = (q - p + A) / (P - Q)
    if mod != 0:
        if floor(k) == k:
            ans += floor(k)
        else:
            ans += floor(k) + 1
    else:
        if floor(k) == k:
            ans += floor(k) - 1
        else:
            ans += floor(k)

print(ans)
0