結果

問題 No.300 平方数
ユーザー pluto77
提出日時 2016-02-13 18:22:39
言語 Python2
(2.7.18)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 314 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 06:15:30
合計ジャッジ時間 2,525 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
##yuki_300

def prime_decomp(n):
 i = 2
 t=[]
 while i * i <= n:
  while n % i == 0:
   n /= i
   t.append(i)
  i += 1
 if n > 1:
  t.append(n)
 return t

x=int(raw_input())
res=1
s=prime_decomp(x)
for i in xrange(len(s)):
 if s.count(s[i]) % 2==0:
  continue
 else:
  res*=s[i]
  s[i]=0

print res
0