結果

問題 No.300 平方数
ユーザー magurogumamaguroguma
提出日時 2017-08-14 20:47:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-21 11:28:13
合計ジャッジ時間 10,062 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
10,752 KB
testcase_01 AC 132 ms
10,624 KB
testcase_02 AC 131 ms
10,624 KB
testcase_03 AC 130 ms
10,624 KB
testcase_04 AC 134 ms
10,624 KB
testcase_05 AC 132 ms
10,624 KB
testcase_06 AC 131 ms
10,624 KB
testcase_07 AC 128 ms
10,624 KB
testcase_08 AC 132 ms
10,624 KB
testcase_09 AC 130 ms
10,624 KB
testcase_10 AC 132 ms
10,624 KB
testcase_11 AC 133 ms
10,624 KB
testcase_12 AC 132 ms
10,752 KB
testcase_13 AC 253 ms
10,624 KB
testcase_14 AC 136 ms
10,624 KB
testcase_15 AC 131 ms
10,752 KB
testcase_16 AC 135 ms
10,752 KB
testcase_17 AC 135 ms
10,752 KB
testcase_18 AC 130 ms
10,752 KB
testcase_19 AC 126 ms
10,624 KB
testcase_20 WA -
testcase_21 AC 133 ms
10,624 KB
testcase_22 AC 132 ms
10,624 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 246 ms
10,624 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 248 ms
10,752 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 247 ms
10,752 KB
testcase_34 AC 247 ms
10,624 KB
testcase_35 AC 247 ms
10,624 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 137 ms
10,624 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 135 ms
10,752 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

X = int(input())

# Xを素因数分解する
primes = {}
for i in range(2,1000001,1):
    while X>=i and X%i==0:
        X //= i
        if i in primes:
            primes[i] += 1
        else:
            primes[i] = 1

Y = 1
if len(primes) == 0:
    Y = X
else:
    for key in primes:
        if primes[key]%2 == 1:
            Y *= key

print(Y)
0