题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
a = int(input())
import math
for i in range(2,int(math.sqrt(a))+1): # 质数的因子除了自身就不可能比平方根要大
while a%i == 0:
print(i,end=' ')
a = int(a/i)
if a > 1 :print(int(a),end=' ')
#题解#
import math
for i in range(2,int(math.sqrt(a))+1): # 质数的因子除了自身就不可能比平方根要大
while a%i == 0:
print(i,end=' ')
a = int(a/i)
if a > 1 :print(int(a),end=' ')
#题解#