結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-14 00:48:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 1,000 ms |
| コード長 | 401 bytes |
| コンパイル時間 | 86 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-13 16:32:45 |
| 合計ジャッジ時間 | 4,716 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
from math import sqrt
import collections
def primeFactorization(n):
ret = []
for i in range(2, int(sqrt(n) + 2)):
while n % i == 0:
n //= i
ret.append(i)
if n > 1:
ret.append(n)
return ret
x = int(input())
counter = collections.Counter(primeFactorization(x))
res = 1
for k, v in counter.items():
if v % 2 == 1:
res *= k
print(res)