結果

問題 No.300 平方数
ユーザー rocoder
提出日時 2017-08-10 04:05:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 329 ms / 1,000 ms
コード長 366 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-12 01:30:50
合計ジャッジ時間 5,038 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

# your code goes here
#square
X=int(input())
N=0
N=X
i=2
a=[]
c=[]
while i*i<=N:
    if N%i==0:
        a.append(i)
        N//=i
        b=1
        while N%i==0:
            N//=i
            b+=1
        c.append(b)
    i+=1
if a==[]:
    a=[X]
    c=[1]
else:
    a.append(N)
    c.append(1)
S=1
for i in range(len(a)):
    if c[i]%2==1:
        S*=a[i]
print(S)
0