Leonardo loves primes and created q queries where each query takes the form of an integer, n . For each n , he wants you to count the maximum number of unique prime factors of any number in the inclusive range [1,n] and then print this value on a new line.
Note: Recall that a prime number is only divisible by 1
and itself, and 1 is not a prime number.
The first line contains an integer,q , denoting the number of queries.
Each i line of the q subsequent lines contains a single integer, n .
For each query, print the maximum number of unique prime factors for any number in the inclusive range [1,n] on a new line.
6 1 2 3 500 5000 10000000000
0 1 1 4 5 10
This problem from hackerrank.
Here what is Maximum number of unique prime factors? What They really want,i read this problem for couple time but confused
Note: i don’t want the solution of this problem,i just want to clear unique prime factor concept.