WUSTOJ 1332: Prime Factors(Java)
2024-08-27 01:18:20
题目链接:1332: Prime Factors
Description
I’ll give you a number , please tell me how many different prime factors in this number.
Input
There is multiple test cases , in each test case there is only one line contains a number N(2<=N<=100000). Process to the end of file.
Output
For each test case , output one line contains one number , indicating different prime factor in the number N.
Sample Input
2
16
124
1235
12346
Sample Output
1
1
2
3
2
HINT
2 = 2
16 = 2 × 2 × 2 × 2
124 = 2 × 2 × 31
1235 = 5 × 13 × 19
12346 = 2 × 6173