結果

問題 No.3253 Banned Product
コンテスト
ユーザー vjudge1
提出日時 2025-11-20 16:44:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 18,468 KB
最終ジャッジ日時 2025-11-20 16:44:04
合計ジャッジ時間 4,216 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 1 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
            

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