题解 | #质数因子#
质数因子
http://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
shu = int(input()) out = '' a = 2 while (shu >= a): if (shu / a == 1 or a > shu**(0.5)):#第二个判断是用于对一个椅子过大时的优化否则第12组跑不过 print(out + str(int(shu))) break elif (shu % a == 0): out = out + str((int(a))) + " " shu = shu / a elif (shu % a != 0): a += 1