結果
問題 |
No.2624 Prediction by Average
|
ユーザー |
![]() |
提出日時 | 2024-03-11 12:20:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 63,616 KB |
最終ジャッジ日時 | 2024-09-29 21:49:09 |
合計ジャッジ時間 | 1,009 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 4 |
ソースコード
import sys input = sys.stdin.readline T = int(input()) for _ in range(T): N, S = input().split() N = int(N) S = int(S.split(".")[1]) ans = max(0, N - 999) for i in range(1, min(N+1, 1000)): l = (S * i + 999) // 1000 r = (S + 1) * i // 1000 if l <= r: ans += 1 print(ans)