結果
問題 | No.2624 Prediction by Average |
ユーザー | 👑 timi |
提出日時 | 2024-02-10 00:33:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 72,876 KB |
最終ジャッジ日時 | 2024-02-10 00:33:23 |
合計ジャッジ時間 | 1,030 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
53,460 KB |
testcase_01 | AC | 56 ms
66,632 KB |
testcase_02 | AC | 60 ms
66,632 KB |
testcase_03 | AC | 32 ms
53,460 KB |
testcase_04 | AC | 75 ms
72,876 KB |
testcase_05 | AC | 80 ms
72,844 KB |
ソースコード
T=int(input()) for i in range(T): x,y=input().split() if y=='100.000': print(x) else: y=y.replace('.','') x,y=int(x),int(y) ans=0 for i in range(1,min(1001,x+1)): if y*i%1000==0: ans+=1 else: c=100*i cc=10**5 p,q=y*c//cc,(y+1)*c//cc if p!=q: if (y+1)*i%1000!=0: ans+=1 if x>1000: ans+=x-1000 print(ans)