結果
| 問題 | No.3253 Banned Product |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-11-25 10:49:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 649 bytes |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 82,352 KB |
| 実行使用メモリ | 72,568 KB |
| 最終ジャッジ日時 | 2025-11-25 10:49:12 |
| 合計ジャッジ時間 | 3,092 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 WA * 1 |
ソースコード
#N,S,T,K=map(int, input().split())
#A=list(map(int, input().split()))
def make_divisors(n):
lower_divisors , upper_divisors = [], []
i = 1
while i*i <= n:
if n % i == 0:
lower_divisors.append(i)
if i != n // i:
upper_divisors.append(n//i)
i += 1
return lower_divisors + upper_divisors[::-1]
T=int(input())
for _ in range(T):
N,K=map(int, input().split())
ans=-1
for i in range(N,-1,-1):
A=make_divisors(i)
f=1
for j in range(len(A)):
if max(A[j],A[-1-j])<=K:
f=-1
if f==1:
ans=i
break
if len(A)==2:
break
print(ans)
timi