package huawei;
/**
* 質數因子
* 6 = 1 x 2 x 3
* 7 = 1 x 7
* 8 = 1 x 2 x 2 x 2
*
* @author ZengWenFeng
* @date 2023.03.02
* @mobile 13805029595
* @email [email protected]
*/
public class HJ_006_Prime_Factor
{
public static void main(String[] ZengWenFeng13805029595)
{
//
long n = 9;
long len = (long) Math.sqrt(n);
System.out.println("len = " + len);
//
for (long i = 2; i <= len; i++)
{
while (n % i == 0)
{
System.out.print(i + " ");
n = n / i;
}
}
System.out.println();
System.out.println("n = " + n);
}
}