結果

問題 No.300 平方数
ユーザー titiatitia
提出日時 2022-11-02 02:31:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 152 ms / 1,000 ms
コード長 277 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,284 KB
最終ジャッジ日時 2023-09-23 13:26:18
合計ジャッジ時間 5,629 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,232 KB
testcase_01 AC 16 ms
8,220 KB
testcase_02 AC 91 ms
8,088 KB
testcase_03 AC 16 ms
8,136 KB
testcase_04 AC 16 ms
8,136 KB
testcase_05 AC 16 ms
8,236 KB
testcase_06 AC 16 ms
8,100 KB
testcase_07 AC 16 ms
8,204 KB
testcase_08 AC 16 ms
8,224 KB
testcase_09 AC 16 ms
8,136 KB
testcase_10 AC 16 ms
8,196 KB
testcase_11 AC 16 ms
8,228 KB
testcase_12 AC 17 ms
8,128 KB
testcase_13 AC 152 ms
8,204 KB
testcase_14 AC 26 ms
8,152 KB
testcase_15 AC 72 ms
8,196 KB
testcase_16 AC 64 ms
8,148 KB
testcase_17 AC 122 ms
8,148 KB
testcase_18 AC 24 ms
8,100 KB
testcase_19 AC 55 ms
8,140 KB
testcase_20 AC 41 ms
8,228 KB
testcase_21 AC 122 ms
8,132 KB
testcase_22 AC 105 ms
8,100 KB
testcase_23 AC 126 ms
8,088 KB
testcase_24 AC 91 ms
8,144 KB
testcase_25 AC 122 ms
8,096 KB
testcase_26 AC 119 ms
8,236 KB
testcase_27 AC 85 ms
7,848 KB
testcase_28 AC 124 ms
8,272 KB
testcase_29 AC 141 ms
8,236 KB
testcase_30 AC 144 ms
8,092 KB
testcase_31 AC 145 ms
8,152 KB
testcase_32 AC 96 ms
8,176 KB
testcase_33 AC 62 ms
8,168 KB
testcase_34 AC 137 ms
8,232 KB
testcase_35 AC 95 ms
8,200 KB
testcase_36 AC 111 ms
8,100 KB
testcase_37 AC 93 ms
8,264 KB
testcase_38 AC 87 ms
8,284 KB
testcase_39 AC 105 ms
8,136 KB
testcase_40 AC 93 ms
8,136 KB
testcase_41 AC 58 ms
8,176 KB
testcase_42 AC 79 ms
8,132 KB
testcase_43 AC 124 ms
8,208 KB
testcase_44 AC 100 ms
8,088 KB
testcase_45 AC 59 ms
7,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x=int(input())

# 素因数分解
import math 
L=int(math.sqrt(x))

FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

ANS=1

for f in FACT:
    if FACT[f]%2==1:
        ANS*=f

print(ANS)
0