题解 | #质数因子#
质数因子
http://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
Remember to add a space at the very end of the character.
import math
x = int(input())
for i in range(2, int(math.sqrt(x))+1):
while x % i == 0:
print(i, end = ' ')
x = x // i
if (x > 2):
print(x, end = ' ')