結果

問題 No.2624 Prediction by Average
ユーザー loop0919loop0919
提出日時 2024-01-05 02:27:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 73,760 KB
最終ジャッジ日時 2024-01-05 02:27:32
合計ジャッジ時間 1,287 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def solve():
    N, S = input().split()
    N = int(N); S = int(S.replace(".", ""))
    
    cnt = 0
    for i in range(1, min(N, 999) + 1):
        if S * i <= (S * i + i) // 1000 * 1000:
            cnt += 1
    
    cnt += max(N - 999, 0)
    print(cnt)

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