結果

問題 No.2624 Prediction by Average
ユーザー ゼットゼット
提出日時 2024-02-09 22:01:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 70,924 KB
最終ジャッジ日時 2024-02-09 22:01:05
合計ジャッジ時間 1,219 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
59,504 KB
testcase_01 AC 56 ms
66,788 KB
testcase_02 AC 116 ms
66,768 KB
testcase_03 AC 34 ms
53,460 KB
testcase_04 AC 120 ms
70,924 KB
testcase_05 AC 113 ms
70,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
for _ in range(Q):
  N,S=input().split()
  N=int(N)
  x=1000*int(S[:-4])+int(S[-3:])
  result=0
  for y in range(1,10001):
    if y>N:
      break
    k1=y*x
    k2=y*(x+1)
    z1=(k1+999)//1000
    z2=(k2+999)//1000
    if z2>z1:
      result+=1
  if N>10000:
    result+=N-10000
  print(result)
0