結果

問題 No.3253 Banned Product
ユーザー Iroha_3856
提出日時 2025-09-03 04:45:17
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 259 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,764 KB
実行使用メモリ 67,036 KB
最終ジャッジ日時 2025-09-05 05:29:08
合計ジャッジ時間 1,493 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import isqrt

N, K = map(int, input().split())

def isgood(x):
	for d in range(1, isqrt(x)+1):
		if x%d: continue
		if d <= K and x/d <= K:
			return False
	return True

for x in range(N, max(0, N-300), -1):
	if isgood(x):
		exit(print(x))
print(-1)
0