import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner reader=new Scanner(System.in);
long num =reader.nextLong();
getPrime(num);
}
private static void getPrime(long num) {
for (int i = 2; i <= num; i++) {
while(num%i==0 && num != 0){
System.out.print(i+" ");
num = num/i;
}
}
}
}
质数因子(java)
最新推荐文章于 2023-09-11 15:48:53 发布