結果

問題 No.3253 Banned Product
コンテスト
ユーザー vjudge1
提出日時 2025-11-20 16:53:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 393 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 17,696 KB
最終ジャッジ日時 2025-11-20 16:53:25
合計ジャッジ時間 4,126 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 2 TLE * 1 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def chck(a, b):
    flg = True
    for i in range(a, 0, -1):
        for j in range(b, 0, -1):
            # print(i, j)
            if i%j==0 and i//j <= b:
                break
            if i%j==0 and i//j > b:
                print(i)
                return
    print(-1)

t = int(input())
for x in range(t):
    a, b= map(int, input().split())
    if a==b: print(-1)
    else: chck(a,b)
0