质数因子计算
质数因子
http://www.nowcoder.com/questionTerminal/196534628ca6490ebce2e336b47b3607
while True: try: n=int(input()) i = 2 while i * i <= n: while n % i == 0: n = n / i print(i, end=" ") i = i + 1 if n - 1: print(int(n), end=" ") except: break
质数因子
http://www.nowcoder.com/questionTerminal/196534628ca6490ebce2e336b47b3607
while True: try: n=int(input()) i = 2 while i * i <= n: while n % i == 0: n = n / i print(i, end=" ") i = i + 1 if n - 1: print(int(n), end=" ") except: break
相关推荐