結果

問題 No.928 軽減税率?
ユーザー hedwig100hedwig100
提出日時 2020-04-09 19:58:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 682 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 8,732 KB
最終ジャッジ日時 2023-10-11 21:25:57
合計ジャッジ時間 2,213 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,552 KB
testcase_01 AC 20 ms
8,616 KB
testcase_02 AC 20 ms
8,536 KB
testcase_03 AC 20 ms
8,616 KB
testcase_04 AC 20 ms
8,580 KB
testcase_05 AC 20 ms
8,512 KB
testcase_06 AC 20 ms
8,556 KB
testcase_07 AC 20 ms
8,468 KB
testcase_08 AC 20 ms
8,696 KB
testcase_09 AC 20 ms
8,532 KB
testcase_10 AC 20 ms
8,608 KB
testcase_11 AC 19 ms
8,712 KB
testcase_12 AC 20 ms
8,528 KB
testcase_13 AC 20 ms
8,544 KB
testcase_14 AC 20 ms
8,576 KB
testcase_15 AC 20 ms
8,604 KB
testcase_16 AC 20 ms
8,536 KB
testcase_17 AC 19 ms
8,540 KB
testcase_18 AC 20 ms
8,732 KB
testcase_19 AC 20 ms
8,668 KB
testcase_20 AC 20 ms
8,524 KB
testcase_21 AC 20 ms
8,524 KB
testcase_22 AC 20 ms
8,552 KB
testcase_23 AC 20 ms
8,536 KB
testcase_24 AC 20 ms
8,616 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 19 ms
8,584 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
INF = 10 ** 10
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)
from bisect import bisect_left,bisect_right
from collections import deque

def ok(x,p,q,a):
    return (x + (x * p)//100) < (x + (x * q)//100) + a

def main():
    p,q,a = map(int,input().split())

    l = -1
    r = 10 ** 9 + 1
    while r - l > 1:
        mid = (r + l)//2
        if ok(mid,p,q,a):
            l = mid
        else:
            r = mid
    
    ans = max(l - 1000,0)
    for i in range(max(l - 999,1),min(l + 1000,1000000001)):
        if ok(i,p,q,a):
            ans += 1
    print(ans)

if __name__ =='__main__':
    main()  
0