結果
問題 | No.2624 Prediction by Average |
ユーザー | rlangevin |
提出日時 | 2024-03-11 12:20:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 64,576 KB |
最終ジャッジ日時 | 2024-03-11 12:20:37 |
合計ジャッジ時間 | 1,768 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 40 ms
59,980 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 37 ms
53,460 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
ソースコード
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)