結果

問題 No.300 平方数
ユーザー shobonvipshobonvip
提出日時 2022-03-12 14:48:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 1,000 ms
コード長 244 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 75,980 KB
最終ジャッジ日時 2023-10-15 03:57:23
合計ジャッジ時間 6,454 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,680 KB
testcase_01 AC 78 ms
71,520 KB
testcase_02 AC 87 ms
75,664 KB
testcase_03 AC 75 ms
71,188 KB
testcase_04 AC 75 ms
71,596 KB
testcase_05 AC 75 ms
71,664 KB
testcase_06 AC 74 ms
71,772 KB
testcase_07 AC 74 ms
71,532 KB
testcase_08 AC 78 ms
71,684 KB
testcase_09 AC 75 ms
71,692 KB
testcase_10 AC 74 ms
71,520 KB
testcase_11 AC 74 ms
71,520 KB
testcase_12 AC 78 ms
75,532 KB
testcase_13 AC 94 ms
75,548 KB
testcase_14 AC 80 ms
75,616 KB
testcase_15 AC 87 ms
75,628 KB
testcase_16 AC 86 ms
75,688 KB
testcase_17 AC 94 ms
75,692 KB
testcase_18 AC 78 ms
75,552 KB
testcase_19 AC 84 ms
75,828 KB
testcase_20 AC 81 ms
75,572 KB
testcase_21 AC 93 ms
75,528 KB
testcase_22 AC 90 ms
75,712 KB
testcase_23 AC 91 ms
75,980 KB
testcase_24 AC 87 ms
75,556 KB
testcase_25 AC 88 ms
75,528 KB
testcase_26 AC 87 ms
75,556 KB
testcase_27 AC 84 ms
75,620 KB
testcase_28 AC 89 ms
75,520 KB
testcase_29 AC 90 ms
75,548 KB
testcase_30 AC 89 ms
75,532 KB
testcase_31 AC 91 ms
75,464 KB
testcase_32 AC 86 ms
75,528 KB
testcase_33 AC 84 ms
75,332 KB
testcase_34 AC 91 ms
75,620 KB
testcase_35 AC 85 ms
75,472 KB
testcase_36 AC 88 ms
75,948 KB
testcase_37 AC 86 ms
75,524 KB
testcase_38 AC 87 ms
75,676 KB
testcase_39 AC 87 ms
75,724 KB
testcase_40 AC 88 ms
75,532 KB
testcase_41 AC 83 ms
75,604 KB
testcase_42 AC 86 ms
75,568 KB
testcase_43 AC 91 ms
75,548 KB
testcase_44 AC 87 ms
75,532 KB
testcase_45 AC 83 ms
75,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def pfact(m):
	pf = {}
	for i in range(2,int(m**0.5)+1):
		while m%i == 0:
			pf[i] = pf.get(i,0) + 1
			m //= i
	if m>1 : pf[m]=1
	return pf


x = int(input())
j = pfact(x)

ans = 1
for i, r in j.items():
	if r % 2 == 1:
		ans *= i

print(ans)
0