結果

問題 No.928 軽減税率?
ユーザー tanon710
提出日時 2020-05-04 22:26:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 439 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 60,500 KB
最終ジャッジ日時 2024-06-25 01:30:13
合計ジャッジ時間 4,904 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q,a=map(int,input().split())
if a==0 and p==q:
    cnt=0
else:
    if p<=q:
        cnt=10**9
        for i in range(1,10**7):
            eatin=i+(i*p)//100
            takeout=i+(i*q)//100+a
            if eatin>=takeout:
                cnt-=1
    elif p>q:
        cnt=0
        for i in range(1,10**7):
            eatin=i+(i*p)//100
            takeout=i+(i*q)//100+a
            if eatin<takeout:
                cnt+=1
print(cnt)
0