题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
import math num = int(input()) for i in range(2,int(math.sqrt(num))+1): while num % i == 0: print(i,end=' ') num=num//i if num>2: print(num)
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
import math num = int(input()) for i in range(2,int(math.sqrt(num))+1): while num % i == 0: print(i,end=' ') num=num//i if num>2: print(num)
相关推荐