結果

問題 No.312 置換処理
ユーザー Konton7Konton7
提出日時 2019-05-21 21:42:59
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 11,980 KB
実行使用メモリ 10,264 KB
最終ジャッジ日時 2023-10-17 10:45:25
合計ジャッジ時間 7,359 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 202 ms
10,200 KB
testcase_02 AC 287 ms
10,264 KB
testcase_03 AC 282 ms
10,264 KB
testcase_04 AC 29 ms
10,200 KB
testcase_05 AC 264 ms
10,264 KB
testcase_06 AC 166 ms
10,264 KB
testcase_07 AC 239 ms
10,264 KB
testcase_08 AC 237 ms
10,264 KB
testcase_09 AC 123 ms
10,264 KB
testcase_10 AC 134 ms
10,264 KB
testcase_11 AC 224 ms
10,264 KB
testcase_12 AC 166 ms
10,264 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 29 ms
10,200 KB
testcase_23 WA -
testcase_24 AC 29 ms
10,264 KB
testcase_25 AC 30 ms
10,200 KB
testcase_26 AC 30 ms
10,264 KB
testcase_27 WA -
testcase_28 AC 29 ms
10,264 KB
testcase_29 AC 29 ms
10,264 KB
testcase_30 AC 64 ms
10,264 KB
testcase_31 WA -
testcase_32 AC 53 ms
10,264 KB
testcase_33 AC 110 ms
10,264 KB
testcase_34 AC 113 ms
10,200 KB
testcase_35 AC 103 ms
10,200 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 98 ms
10,264 KB
testcase_40 AC 41 ms
10,264 KB
testcase_41 AC 29 ms
10,200 KB
testcase_42 AC 37 ms
10,264 KB
testcase_43 AC 29 ms
10,200 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())


p = 2
pmax = int(n**0.5)

num_list = []
while p <= pmax:
	if n % p == 0:
		while n % p == 0:
			n //= p
			num_list.append(p)
	p += 1
	
if n != 1:
	num_list.append(n)


if num_list[0] > 2:
	print(num_list[0])
elif num_list[0] == 2:
	if num_list[1] == 2:
		if 3 not in num_list:
			print(3)
		else:
			print(4)
	else:
		print(num_list[1])
0