結果

問題 No.300 平方数
ユーザー ronpooronpoo
提出日時 2023-09-19 12:00:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 1,000 ms
コード長 540 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 75,708 KB
最終ジャッジ日時 2023-09-19 12:00:21
合計ジャッジ時間 6,861 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,216 KB
testcase_01 AC 75 ms
71,328 KB
testcase_02 AC 75 ms
71,560 KB
testcase_03 AC 75 ms
71,280 KB
testcase_04 AC 75 ms
71,476 KB
testcase_05 AC 74 ms
71,272 KB
testcase_06 AC 75 ms
71,348 KB
testcase_07 AC 75 ms
71,436 KB
testcase_08 AC 74 ms
71,472 KB
testcase_09 AC 80 ms
71,376 KB
testcase_10 AC 75 ms
71,548 KB
testcase_11 AC 75 ms
71,440 KB
testcase_12 AC 75 ms
71,328 KB
testcase_13 AC 84 ms
75,344 KB
testcase_14 AC 74 ms
71,296 KB
testcase_15 AC 73 ms
71,484 KB
testcase_16 AC 73 ms
71,332 KB
testcase_17 AC 74 ms
71,408 KB
testcase_18 AC 74 ms
71,324 KB
testcase_19 AC 76 ms
71,552 KB
testcase_20 AC 75 ms
75,304 KB
testcase_21 AC 79 ms
71,360 KB
testcase_22 AC 76 ms
71,472 KB
testcase_23 AC 78 ms
75,380 KB
testcase_24 AC 77 ms
75,396 KB
testcase_25 AC 82 ms
75,416 KB
testcase_26 AC 78 ms
75,548 KB
testcase_27 AC 79 ms
75,288 KB
testcase_28 AC 85 ms
75,372 KB
testcase_29 AC 84 ms
75,276 KB
testcase_30 AC 79 ms
75,344 KB
testcase_31 AC 80 ms
75,216 KB
testcase_32 AC 81 ms
75,412 KB
testcase_33 AC 80 ms
75,708 KB
testcase_34 AC 86 ms
75,372 KB
testcase_35 AC 83 ms
75,636 KB
testcase_36 AC 79 ms
75,288 KB
testcase_37 AC 82 ms
75,492 KB
testcase_38 AC 79 ms
75,396 KB
testcase_39 AC 80 ms
75,216 KB
testcase_40 AC 78 ms
75,428 KB
testcase_41 AC 79 ms
75,452 KB
testcase_42 AC 75 ms
71,340 KB
testcase_43 AC 78 ms
75,400 KB
testcase_44 AC 84 ms
75,344 KB
testcase_45 AC 79 ms
75,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X = int(input())

def prime_factorize_num(x):
    d = dict()
    if x % 2 == 0:
        d[2] = 0
    while x % 2 == 0:
        d[2] += 1
        x //= 2
    f = 3
    while f * f <= x:
        if x % f == 0:
            if f not in d:
                d[f] = 0
            d[f] += 1
            x //= f
        else:
            f += 2
    if x != 1:
        if x not in d:
            d[x] = 0
        d[x] += 1
        
    return d

p = prime_factorize_num(X)

ans = 1
for k, v in p.items():
    if v % 2 == 1:
        ans *= k
print(ans)
0