結果

問題 No.3253 Banned Product
ユーザー miztom
提出日時 2025-09-06 02:26:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 384 ms
コンパイル使用メモリ 82,348 KB
実行使用メモリ 65,036 KB
最終ジャッジ日時 2025-09-06 02:26:41
合計ジャッジ時間 1,958 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x,k):
    for i in range(1,min(int(x**.5)+2,k)+1):
        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