結果
| 問題 |
No.3253 Banned Product
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-05 15:24:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 300 bytes |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 82,604 KB |
| 実行使用メモリ | 63,188 KB |
| 最終ジャッジ日時 | 2025-09-05 15:24:53 |
| 合計ジャッジ時間 | 1,806 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
for _ in range(int(input())):
N,K=map(int,input().split())
b1=False
while K<N:
b2=False
for i in range(1,int(N**0.5)+2):
if N%i==0 and max(i,N//i)<=K : b2=True ; break
if b2 : N-=1 ; continue
print(N) ; b1=True ; break
if not b1 : print(-1)