結果

問題 No.300 平方数
ユーザー akitsugu777
提出日時 2018-11-30 11:05:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 373 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,696 KB
最終ジャッジ日時 2024-06-26 23:08:44
合計ジャッジ時間 3,137 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())

d = {}
s = 0
while s == 0:
    for i in range(2, x+1):
        if x % i == 0:
            x = x// i
            if not i in d:
                d[i] = 1
            else:
                d[i] += 1
            if x == 1:
                s = 1
            break

keys = [k for k, v in d.items() if v % 2 != 0]

ans = 1
for i in keys:
    ans *= i

print(ans)
0