結果

問題 No.2624 Prediction by Average
ユーザー 👑 timitimi
提出日時 2024-02-09 23:14:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 73,020 KB
最終ジャッジ日時 2024-02-09 23:14:22
合計ジャッジ時間 1,154 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 36 ms
53,460 KB
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)):
      c=100*i
      p,q=y*c,(y+1)*c
      if p%100000==0:
        ans+=1
      else:        
        p//=1000;q//=1000 
        if p//100!=q//100:
          ans+=1
    if x>1000:
      ans+=x-1000
    print(ans)
0