結果

問題 No.300 平方数
ユーザー ayame_pyayame_py
提出日時 2015-11-13 23:18:47
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 37,936 KB
最終ジャッジ日時 2023-10-11 16:34:05
合計ジャッジ時間 8,145 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
37,744 KB
testcase_01 AC 135 ms
37,868 KB
testcase_02 AC 137 ms
37,904 KB
testcase_03 AC 136 ms
37,712 KB
testcase_04 AC 136 ms
37,716 KB
testcase_05 AC 135 ms
37,704 KB
testcase_06 AC 136 ms
37,868 KB
testcase_07 AC 135 ms
37,864 KB
testcase_08 AC 135 ms
37,716 KB
testcase_09 AC 135 ms
37,812 KB
testcase_10 AC 136 ms
37,816 KB
testcase_11 AC 135 ms
37,792 KB
testcase_12 AC 134 ms
37,808 KB
testcase_13 AC 136 ms
37,644 KB
testcase_14 AC 136 ms
37,840 KB
testcase_15 AC 134 ms
37,884 KB
testcase_16 AC 135 ms
37,700 KB
testcase_17 AC 136 ms
37,812 KB
testcase_18 AC 133 ms
37,588 KB
testcase_19 AC 134 ms
37,740 KB
testcase_20 WA -
testcase_21 AC 135 ms
37,804 KB
testcase_22 AC 136 ms
37,700 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 136 ms
37,644 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 137 ms
37,788 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 138 ms
37,844 KB
testcase_34 AC 138 ms
37,812 KB
testcase_35 AC 137 ms
37,916 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 136 ms
37,784 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 135 ms
37,760 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

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