結果

問題 No.300 平方数
ユーザー nebukuro09
提出日時 2016-09-28 15:33:56
言語 Python2
(2.7.18)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 364 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,912 KB
最終ジャッジ日時 2024-11-21 07:57:01
合計ジャッジ時間 2,920 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

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

X = input()
ans = 1
for k, v in Counter(prime_decomposition(X)).items():
    if v%2:
        ans *= k
print ans
0