結果

問題 No.312 置換処理
ユーザー 双六双六
提出日時 2020-08-19 18:40:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 699 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 60,928 KB
最終ジャッジ日時 2024-04-27 11:09:31
合計ジャッジ時間 3,563 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
60,420 KB
testcase_01 AC 58 ms
59,744 KB
testcase_02 AC 59 ms
60,240 KB
testcase_03 AC 58 ms
60,768 KB
testcase_04 AC 43 ms
54,500 KB
testcase_05 AC 58 ms
59,616 KB
testcase_06 AC 52 ms
59,956 KB
testcase_07 AC 56 ms
60,068 KB
testcase_08 AC 55 ms
59,744 KB
testcase_09 AC 51 ms
59,452 KB
testcase_10 AC 51 ms
59,484 KB
testcase_11 AC 55 ms
59,292 KB
testcase_12 AC 52 ms
60,004 KB
testcase_13 AC 56 ms
59,468 KB
testcase_14 AC 53 ms
60,928 KB
testcase_15 AC 50 ms
60,024 KB
testcase_16 AC 50 ms
59,760 KB
testcase_17 AC 55 ms
59,592 KB
testcase_18 AC 55 ms
60,184 KB
testcase_19 AC 56 ms
59,008 KB
testcase_20 AC 57 ms
59,440 KB
testcase_21 AC 57 ms
60,852 KB
testcase_22 AC 41 ms
55,524 KB
testcase_23 AC 41 ms
54,508 KB
testcase_24 AC 42 ms
54,756 KB
testcase_25 AC 42 ms
55,280 KB
testcase_26 AC 42 ms
54,332 KB
testcase_27 AC 42 ms
54,936 KB
testcase_28 AC 41 ms
53,804 KB
testcase_29 AC 42 ms
54,848 KB
testcase_30 AC 47 ms
58,948 KB
testcase_31 AC 47 ms
59,492 KB
testcase_32 AC 47 ms
59,800 KB
testcase_33 AC 52 ms
60,204 KB
testcase_34 AC 50 ms
59,492 KB
testcase_35 AC 50 ms
59,416 KB
testcase_36 AC 42 ms
54,508 KB
testcase_37 AC 42 ms
54,676 KB
testcase_38 AC 41 ms
54,084 KB
testcase_39 AC 49 ms
59,872 KB
testcase_40 AC 45 ms
59,948 KB
testcase_41 AC 43 ms
55,664 KB
testcase_42 AC 46 ms
59,276 KB
testcase_43 AC 42 ms
53,920 KB
testcase_44 AC 43 ms
54,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def divisor(N):
	divisor_list = []
	n = int((N ** 0.5) // 1)
	for i in range(1, n):
		if N % i == 0:
			divisor_list.append(i)
			divisor_list.append(int(N // i))

	if n ** 2 == N:
		divisor_list.append(n)
	else:
		if N % n == 0:
			divisor_list.append(n)
			divisor_list.append(int(N // n))

	return sorted(divisor_list)

#処理内容
def main():
	N = int(input())
	div = divisor(N)
	ans = N
	for i in div:
		if i > 2:
			ans = min(ans, i)

	print(ans)




if __name__ == '__main__':
	main()
0