結果

問題 No.928 軽減税率?
ユーザー tamatotamato
提出日時 2019-11-22 21:55:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 52,608 KB
最終ジャッジ日時 2024-04-19 11:13:05
合計ジャッジ時間 2,761 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,352 KB
testcase_01 AC 32 ms
52,352 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 31 ms
52,096 KB
testcase_05 AC 32 ms
52,480 KB
testcase_06 AC 31 ms
52,224 KB
testcase_07 AC 34 ms
52,480 KB
testcase_08 AC 31 ms
52,096 KB
testcase_09 AC 33 ms
52,136 KB
testcase_10 AC 35 ms
52,224 KB
testcase_11 AC 32 ms
52,412 KB
testcase_12 AC 31 ms
52,284 KB
testcase_13 AC 31 ms
52,096 KB
testcase_14 AC 31 ms
52,608 KB
testcase_15 AC 31 ms
52,480 KB
testcase_16 AC 30 ms
52,352 KB
testcase_17 AC 32 ms
52,352 KB
testcase_18 WA -
testcase_19 AC 32 ms
52,352 KB
testcase_20 AC 31 ms
52,480 KB
testcase_21 AC 31 ms
51,968 KB
testcase_22 AC 31 ms
52,352 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 32 ms
51,968 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
p, q, a = map(int, input().split())

ok = 0
ng = 10**9+1
mid = (ok+ng) // 2
while ng - ok > 1:
    if math.floor((1 + p/100) * mid) < math.floor((1+q/100) * mid) + a:
        ok = mid
    else:
        ng = mid
    mid = (ok+ng) // 2

ans = ok+200
for i in range(max(1, ok-200), ok+201):
    if math.floor((1 + p/100) * i) >= math.floor((1+q/100) * i) + a:
        ans -= 1

print(ans)
0