結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,460 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 32 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(10001,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>10000:
      ans+=x-1000
    print(ans)
0