题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
x=int(input())
l=pow(x,0.5)
s=2
c=[]
while l>s:
if x%s==0:
c.append(s)
x=x/s
else: s+=1
if c==[] : print(x)
print(" ".join(str(i) for i in c))
查看1道真题和解析