题解 | #质数因子#
质数因子
http://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
笨办法
num = int(num)
p = 2
s = ''
while num!=1:
if num%p==0:
s = s+ str(p)+' '
num = num//p
elif p>int(num**0.5):
s = s + str(num) + ' '
break
else:p = p+1
print(s)

滴滴公司福利 1784人发布