結果
問題 | No.2624 Prediction by Average |
ユーザー |
![]() |
提出日時 | 2024-08-17 16:57:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 1,286 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 72,192 KB |
最終ジャッジ日時 | 2024-08-17 16:57:28 |
合計ジャッジ時間 | 1,423 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
T = int(input()) for _ in range(T): N, S = input().split() N = int(N) S = int(S.replace(".", "")) cnt = 0 for i in range(1, min(N+1, 1000)): left = S*i right = (S+1)*i-1 if left%1000 == 0 or left//1000 != right//1000: cnt += 1 print(cnt+max(0, N-999))