結果
| 問題 | 
                            No.300 平方数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-12-03 03:52:05 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 293 bytes | 
| コンパイル時間 | 264 ms | 
| コンパイル使用メモリ | 6,940 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-14 08:19:00 | 
| 合計ジャッジ時間 | 3,888 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 16 WA * 27 | 
ソースコード
# -*- coding: utf-8 -*-
X = int(input())
P = []
i = 2
while i * i <= X:
    cnt = 0
    while X % i == 0:
        X /= i
        cnt += 1
    if cnt % 2:
        P.append(i)
    i += 1
if not len(P):
    P.append(X)
    
ret = 1
for i in xrange(len(P)):
    ret *= P[i]
print ret