結果

問題 No.300 平方数
ユーザー cormoran
提出日時 2016-07-05 17:49:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 282 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 62,464 KB
最終ジャッジ日時 2024-10-12 20:16:46
合計ジャッジ時間 3,977 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

X = int(input())

factors = {}
i = 2
while X > 1:
    if X % i == 0:
        X = int(X / i)
        if not i in factors:
            factors[i] = 0
        factors[i] += 1
    else:
        i += 1

Y = 1

for key in factors:
    if factors[key] % 2 != 0:
        Y *= key

print(Y)
0