結果

問題 No.2624 Prediction by Average
ユーザー 👑 rin204rin204
提出日時 2024-02-10 00:44:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,300 KB
最終ジャッジ日時 2024-02-10 00:44:18
合計ジャッジ時間 1,122 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
57,044 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 35 ms
53,460 KB
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n, s = map(float, input().split())
    n = int(n)
    s = int(s * 1000)
    s %= 1000
    ans = max(0, n - 1000)
    n = min(n, 1000)

    for k in range(1, n + 1):
        x = k * (s + 1) // 1000
        if k * s <= 1000 * x:
            ans += 1
    print(ans)


for _ in range(int(input())):
    solve()
0