题解 | #质数因子#
质数因子
http://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
python3
num = int(input())
def getZhi(x):
isZhi = 1
for i in range(2,int(x**0.5+2)):
if x%i == 0:
isZhi = 0
print(i,end=' ')
getZhi(x//i)
break
if isZhi == 1:
print(x,end=' ')
getZhi(num)
查看11道真题和解析