結果

問題 No.300 平方数
ユーザー rlangevinrlangevin
提出日時 2023-01-05 00:12:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 453 bytes
コンパイル時間 1,868 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 75,996 KB
最終ジャッジ日時 2023-08-18 20:55:10
合計ジャッジ時間 7,375 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,708 KB
testcase_01 AC 68 ms
71,404 KB
testcase_02 AC 76 ms
75,632 KB
testcase_03 AC 65 ms
71,328 KB
testcase_04 AC 67 ms
71,708 KB
testcase_05 AC 64 ms
71,708 KB
testcase_06 AC 64 ms
71,772 KB
testcase_07 AC 65 ms
71,440 KB
testcase_08 AC 66 ms
71,576 KB
testcase_09 AC 68 ms
71,584 KB
testcase_10 AC 68 ms
71,444 KB
testcase_11 AC 65 ms
71,828 KB
testcase_12 AC 70 ms
75,624 KB
testcase_13 AC 83 ms
75,648 KB
testcase_14 AC 72 ms
75,508 KB
testcase_15 AC 76 ms
75,872 KB
testcase_16 AC 77 ms
75,596 KB
testcase_17 AC 83 ms
75,544 KB
testcase_18 AC 70 ms
75,784 KB
testcase_19 AC 77 ms
75,540 KB
testcase_20 AC 74 ms
75,744 KB
testcase_21 AC 83 ms
75,384 KB
testcase_22 AC 82 ms
75,544 KB
testcase_23 AC 79 ms
75,620 KB
testcase_24 AC 74 ms
75,644 KB
testcase_25 AC 81 ms
75,592 KB
testcase_26 AC 79 ms
75,588 KB
testcase_27 AC 74 ms
75,616 KB
testcase_28 AC 78 ms
75,996 KB
testcase_29 AC 80 ms
75,744 KB
testcase_30 AC 83 ms
75,540 KB
testcase_31 AC 81 ms
75,628 KB
testcase_32 AC 79 ms
75,580 KB
testcase_33 AC 74 ms
75,588 KB
testcase_34 AC 80 ms
75,584 KB
testcase_35 AC 77 ms
75,716 KB
testcase_36 AC 78 ms
75,540 KB
testcase_37 AC 75 ms
75,592 KB
testcase_38 AC 75 ms
75,580 KB
testcase_39 AC 78 ms
75,772 KB
testcase_40 AC 76 ms
75,488 KB
testcase_41 AC 72 ms
75,616 KB
testcase_42 AC 77 ms
75,696 KB
testcase_43 AC 78 ms
75,552 KB
testcase_44 AC 76 ms
75,540 KB
testcase_45 AC 73 ms
75,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    return arr

X = int(input())
L = factorization(X)
for i in range(len(L)):
    L[i][1] = L[i][1] % 2
    
ans = 1
for a, b in L:
    ans *= a ** b
print(ans)
0