题目描述
分解质因数 + 枚举约数i <= n / i
样例
import java.util.*;
/*
分解质因数 + 枚举约数i <= n / i
*/
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
int res = 0;
for (long i = 2; i <= n / i; i ++ )
if (n % i == 0)
{
while (n % i == 0) n /= i;
res ++ ;
}
if (n > 1) res ++ ;
System.out.println(res);
}
}