結果

問題 No.312 置換処理
コンテスト
ユーザー soupesuteaka
提出日時 2016-02-24 16:10:23
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 199 ms
コンパイル使用メモリ 77,836 KB
最終ジャッジ日時 2025-12-03 19:30:02
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#coding: UTF-8

import sys
from operator import itemgetter
import re
import itertools
import math

N = input()

while (N%2==0):
	N/=2

flg = N==1
if (flg):
	print 4
else:
	flg = True
	for i in range(3,long(math.sqrt(N)+1)):
		if (N%i==0):
			print i
			flg = False
			break
	if (flg) :
		print N
0