結果

問題 No.928 軽減税率?
ユーザー convexineqconvexineq
提出日時 2021-05-05 06:11:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 368 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 82,236 KB
実行使用メモリ 53,740 KB
最終ジャッジ日時 2024-09-13 01:18:54
合計ジャッジ時間 2,542 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q,a = map(int,input().split())
ans = 0
c = p-q
if c == 0:
    print(10**9 if a else 0)
    exit()
for i in range(1,101):
    v = (100+p)*i//100
    w = (100+q)*i//100
    # (p-q)x < w+a-v? (for 0 <= x < 10**7)
    w += a-v
    if c < 0:
        ans += 10**7
        if w==0: ans -= 1
    else:
        # cx < w?
        ans += max(0,min(10**7,(w+c-1)//c))
print(ans)
0