题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
num = int(input())
res = []
if num == 1 or num == 2:
print(num)
n = 2
f = False
while(num != 1): # 2 2 5
if num % n == 0:
print(n,end=" ")
num = num / n
continue
if n * n < num:
n += 1
else:
f = True
break
if f == True:
print(int(num),end=" ")
vivo公司福利 363人发布
