题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
N = int(input()) p = 2 while p < int(N**0.5)+1: if N % p == 0: print(p, end=' ') N = N // p continue p += 1 print(N)
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
N = int(input()) p = 2 while p < int(N**0.5)+1: if N % p == 0: print(p, end=' ') N = N // p continue p += 1 print(N)
相关推荐