結果

問題 No.928 軽減税率?
ユーザー mkawa2mkawa2
提出日時 2021-04-06 11:54:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 870 ms / 1,000 ms
コード長 1,185 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 11,120 KB
実行使用メモリ 8,420 KB
最終ジャッジ日時 2023-08-30 23:11:30
合計ジャッジ時間 25,942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 806 ms
8,224 KB
testcase_01 AC 806 ms
8,268 KB
testcase_02 AC 481 ms
8,304 KB
testcase_03 AC 479 ms
8,388 KB
testcase_04 AC 790 ms
8,252 KB
testcase_05 AC 807 ms
8,284 KB
testcase_06 AC 820 ms
8,304 KB
testcase_07 AC 793 ms
8,360 KB
testcase_08 AC 852 ms
8,420 KB
testcase_09 AC 790 ms
8,248 KB
testcase_10 AC 847 ms
8,276 KB
testcase_11 AC 789 ms
8,224 KB
testcase_12 AC 821 ms
8,372 KB
testcase_13 AC 840 ms
8,252 KB
testcase_14 AC 813 ms
8,220 KB
testcase_15 AC 812 ms
8,324 KB
testcase_16 AC 802 ms
8,388 KB
testcase_17 AC 870 ms
8,356 KB
testcase_18 AC 859 ms
8,220 KB
testcase_19 AC 860 ms
8,220 KB
testcase_20 AC 849 ms
8,340 KB
testcase_21 AC 860 ms
8,252 KB
testcase_22 AC 15 ms
8,360 KB
testcase_23 AC 16 ms
8,376 KB
testcase_24 AC 506 ms
8,348 KB
testcase_25 AC 488 ms
8,404 KB
testcase_26 AC 496 ms
8,272 KB
testcase_27 AC 503 ms
8,352 KB
testcase_28 AC 483 ms
8,360 KB
testcase_29 AC 476 ms
8,224 KB
testcase_30 AC 481 ms
8,392 KB
testcase_31 AC 463 ms
8,256 KB
testcase_32 AC 16 ms
8,284 KB
testcase_33 AC 505 ms
8,304 KB
testcase_34 AC 505 ms
8,216 KB
testcase_35 AC 497 ms
8,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LI1(): return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
dij = [(0, 1), (1, 0), (1, 1), (1, -1)]
inf = 10**19
# md = 998244353
md = 10**9+7

p,q,a=LI()

if p==q:
    if a==0:print(0)
    else:print(10**9)
    exit()

if p<q:
    ans=10**9-1000004
    for x in range(1,1000005):
        s = (100+p)*x//100
        h = (100+q)*x//100+a
        if s < h: ans += 1
    print(ans)
else:
    l=max(1,100*a//(p-q)-1000000)
    r=min(10**9+1,l+2000000)
    ans=l-1
   
    for x in range(l,r):
        s=(100+p)*x//100
        h=(100+q)*x//100+a
        if s<h:ans+=1
    
    print(ans)
0