题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
a = int(input()) # b = int(a/2) L = [] def cul(a,L): if a==1: return for i in range(2,int(a**(1/2))+1): if a % i == 0 and a != 1: L.append(i) next =int( a / i) _,a = cul(next,L) break return L,a L,b = cul(a,L) if b != 1: L.append(b) print(" ".join(str(i) for i in L))