結果

問題 No.300 平方数
ユーザー ayame_pyayame_py
提出日時 2015-11-13 23:15:51
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 689 ms
コンパイル使用メモリ 6,524 KB
実行使用メモリ 37,908 KB
最終ジャッジ日時 2023-10-11 16:31:36
合計ジャッジ時間 5,714 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,140 KB
testcase_01 AC 12 ms
6,044 KB
testcase_02 AC 97 ms
27,444 KB
testcase_03 AC 12 ms
6,044 KB
testcase_04 AC 11 ms
6,092 KB
testcase_05 AC 11 ms
6,140 KB
testcase_06 AC 11 ms
6,032 KB
testcase_07 AC 11 ms
6,228 KB
testcase_08 AC 11 ms
6,132 KB
testcase_09 AC 12 ms
6,132 KB
testcase_10 AC 12 ms
6,140 KB
testcase_11 AC 12 ms
6,232 KB
testcase_12 AC 13 ms
6,448 KB
testcase_13 AC 140 ms
37,908 KB
testcase_14 AC 24 ms
9,064 KB
testcase_15 AC 77 ms
22,028 KB
testcase_16 AC 70 ms
20,176 KB
testcase_17 AC 137 ms
37,800 KB
testcase_18 AC 22 ms
8,368 KB
testcase_19 AC 59 ms
17,912 KB
testcase_20 WA -
testcase_21 AC 139 ms
37,836 KB
testcase_22 AC 123 ms
33,904 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 115 ms
31,724 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 114 ms
31,208 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 55 ms
16,336 KB
testcase_34 AC 126 ms
34,184 KB
testcase_35 AC 87 ms
24,364 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 99 ms
27,140 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 87 ms
24,456 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,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