結果

問題 No.300 平方数
ユーザー flippergoflippergo
提出日時 2020-12-28 10:46:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 1,000 ms
コード長 394 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 76,296 KB
最終ジャッジ日時 2024-04-10 09:10:26
合計ジャッジ時間 6,167 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
74,788 KB
testcase_01 AC 95 ms
75,124 KB
testcase_02 AC 94 ms
75,560 KB
testcase_03 AC 97 ms
75,940 KB
testcase_04 AC 94 ms
74,964 KB
testcase_05 AC 93 ms
74,376 KB
testcase_06 AC 93 ms
74,504 KB
testcase_07 AC 92 ms
74,504 KB
testcase_08 AC 96 ms
74,648 KB
testcase_09 AC 93 ms
74,812 KB
testcase_10 AC 91 ms
74,416 KB
testcase_11 AC 93 ms
74,320 KB
testcase_12 AC 93 ms
75,552 KB
testcase_13 AC 95 ms
75,988 KB
testcase_14 AC 94 ms
74,764 KB
testcase_15 AC 93 ms
75,548 KB
testcase_16 AC 95 ms
75,448 KB
testcase_17 AC 95 ms
74,808 KB
testcase_18 AC 98 ms
75,572 KB
testcase_19 AC 97 ms
75,832 KB
testcase_20 AC 95 ms
74,788 KB
testcase_21 AC 95 ms
75,072 KB
testcase_22 AC 97 ms
74,832 KB
testcase_23 AC 92 ms
74,316 KB
testcase_24 AC 96 ms
74,972 KB
testcase_25 AC 96 ms
75,592 KB
testcase_26 AC 94 ms
74,528 KB
testcase_27 AC 96 ms
74,300 KB
testcase_28 AC 92 ms
74,240 KB
testcase_29 AC 94 ms
75,264 KB
testcase_30 AC 98 ms
75,692 KB
testcase_31 AC 95 ms
75,280 KB
testcase_32 AC 92 ms
75,052 KB
testcase_33 AC 93 ms
74,892 KB
testcase_34 AC 95 ms
75,252 KB
testcase_35 AC 95 ms
74,920 KB
testcase_36 AC 96 ms
74,248 KB
testcase_37 AC 96 ms
74,852 KB
testcase_38 AC 97 ms
76,064 KB
testcase_39 AC 96 ms
74,888 KB
testcase_40 AC 97 ms
74,464 KB
testcase_41 AC 94 ms
74,784 KB
testcase_42 AC 98 ms
74,528 KB
testcase_43 AC 97 ms
74,428 KB
testcase_44 AC 96 ms
76,296 KB
testcase_45 AC 93 ms
75,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = [1 for _ in range(10**6)]
P[0]=0
P[1]=0
for i in range(2,1001):
    for j in range(i*i,10**6,i):
        P[j]=0
Q = []
for i in range(10**6):
    if P[i]==1:
        Q.append(i)
x = int(input())
C = {}
for q in Q:
    if x%q==0:
        C[q]=0
        while x%q==0:
            x = x//q
            C[q] += 1
if x>1:
    C[x] = 1
y = 1
for q in C:
    if C[q]%2==1:
        y = y*q
print(y)
0