結果

問題 No.136 Yet Another GCD Problem
ユーザー Snark86Snark86
提出日時 2016-04-27 07:00:09
言語 Python2
(2.7.18)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 295 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 10,548 KB
最終ジャッジ日時 2024-04-15 04:35:29
合計ジャッジ時間 3,167 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,816 KB
testcase_01 AC 12 ms
6,940 KB
testcase_02 AC 12 ms
6,940 KB
testcase_03 AC 82 ms
8,752 KB
testcase_04 AC 136 ms
10,364 KB
testcase_05 AC 35 ms
7,296 KB
testcase_06 AC 30 ms
7,296 KB
testcase_07 AC 34 ms
7,368 KB
testcase_08 AC 65 ms
8,416 KB
testcase_09 AC 16 ms
6,940 KB
testcase_10 AC 69 ms
8,440 KB
testcase_11 AC 109 ms
9,544 KB
testcase_12 AC 12 ms
6,944 KB
testcase_13 AC 57 ms
8,100 KB
testcase_14 AC 149 ms
10,548 KB
testcase_15 AC 132 ms
10,280 KB
testcase_16 AC 116 ms
9,836 KB
testcase_17 AC 96 ms
9,320 KB
testcase_18 AC 11 ms
6,940 KB
testcase_19 AC 105 ms
9,492 KB
testcase_20 AC 76 ms
8,616 KB
testcase_21 AC 15 ms
6,940 KB
testcase_22 AC 11 ms
6,940 KB
testcase_23 AC 11 ms
6,944 KB
testcase_24 AC 12 ms
6,944 KB
testcase_25 AC 11 ms
6,940 KB
testcase_26 AC 12 ms
6,940 KB
testcase_27 AC 104 ms
9,496 KB
testcase_28 AC 75 ms
8,740 KB
testcase_29 AC 15 ms
6,948 KB
testcase_30 AC 11 ms
6,940 KB
testcase_31 AC 11 ms
6,944 KB
testcase_32 AC 11 ms
6,940 KB
testcase_33 AC 11 ms
6,940 KB
testcase_34 AC 44 ms
7,680 KB
testcase_35 AC 68 ms
8,520 KB
testcase_36 AC 29 ms
7,168 KB
testcase_37 AC 124 ms
9,992 KB
testcase_38 AC 11 ms
6,940 KB
testcase_39 AC 11 ms
6,940 KB
testcase_40 AC 11 ms
6,944 KB
testcase_41 AC 12 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

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