結果
問題 |
No.2624 Prediction by Average
|
ユーザー |
![]() |
提出日時 | 2024-02-10 17:40:27 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 502 bytes |
コンパイル時間 | 385 ms |
コンパイル使用メモリ | 82,476 KB |
実行使用メモリ | 69,044 KB |
最終ジャッジ日時 | 2024-09-28 17:13:38 |
合計ジャッジ時間 | 1,229 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 4 |
ソースコード
# とりあえず愚直を作ってみる # Nが1000を超えれば常に可能なので、1000までを愚直に調べればいい from math import ceil, floor T = int(input()) for t in range(T): N, S = map(float, input().split()) N = int(N) ans = max(0, N-999) for n in range(1, min(999, N)+1): low = max(0, ceil(S*n)) high = min(100*n, floor((S+0.001)*n)) if high >= low: ans += 1 #print('n', n, 'low', low, 'high', high) print(ans)