結果

問題 No.300 平方数
ユーザー ayame_py
提出日時 2015-11-13 23:18:47
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 38,384 KB
最終ジャッジ日時 2024-09-13 15:14:03
合計ジャッジ時間 8,285 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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,1000000):
	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