結果

問題 No.300 平方数
ユーザー ayame_pyayame_py
提出日時 2015-11-13 23:15:51
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 38,168 KB
最終ジャッジ日時 2024-09-13 15:11:51
合計ジャッジ時間 4,795 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import math
X=input()
N=X
prime = 1
ans = 1
sqrtX=int(math.sqrt(X))+1
for i in range(2,sqrtX+20):
	if(N%i==0):
		prime = 0
		count = 0
		while(N%i==0):
			N/=i
			count+=1
		#print i, count
		if count%2==1: ans*=i

if prime == 1: print X
else: print ans
0