結果

問題 No.3253 Banned Product
ユーザー miztom
提出日時 2025-09-06 02:25:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 82,676 KB
実行使用メモリ 64,808 KB
最終ジャッジ日時 2025-09-06 02:25:14
合計ジャッジ時間 1,902 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 8 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x,k):
    for i in range(1,int(x**.5)+2):
        if x%i<1 and x//i<=k:return 0
    return 1
for i in range(int(input())):
    n,k=map(int,input().split());p=500
    while n*p:
        if f(n,k):print(n);break
        n-=1;p-=1
    else:print(-1)
0