結果

問題 No.300 平方数
ユーザー Dexctersu
提出日時 2018-01-31 00:30:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 362 ms / 1,000 ms
コード長 228 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-29 21:55:19
合計ジャッジ時間 5,646 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
i=2
table=[]
while i*i<=n:
    while n%i==0:
        n//=i
        table.append(i)
    i+=1
if 1<n:
    table.append(n)
s=set(table)
ans=1
for i in s:
    w=table.count(i)
    if w%2!=0:
        ans*=i
print(ans)
0