题解 | #质因数的个数#
质因数的个数
https://www.nowcoder.com/practice/20426b85f7fc4ba8b0844cc04807fbd9
def iss(x):#如果这两处不用根号降复杂度的话,会超时
for i in range(2, int(x ** 0.5) + 1):
if x % i == 0:
return False
if x == 1:
return False
return True
while True:
try:
n = int(input())
ct = 1
i = 1
while i <= int(n ** 0.5):
if n % i == 0 and iss(i):
n = n // i
ct = ct + 1
else:
i = i + 1
print(ct)
except:
break

