結果

問題 No.136 Yet Another GCD Problem
ユーザー Snark86
提出日時 2016-04-27 06:56:58
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 10,676 KB
最終ジャッジ日時 2024-10-04 16:00:10
合計ジャッジ時間 3,376 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n,k = map(int,raw_input().split())

a = [i for i in range(2,n+1)]
p = []
while a:
	if a[0] < math.sqrt(a[-1]):
		p.append(a[0])
		a = filter(lambda x:x%a[0]!=0, a)
	else:
		p += a
		break
b=[2,1]
if n not in p:
	for i in p:
		if n%i == 0:
			s = n/i
			b = [i,s]
			break
print b[1]
0