#K60792. Count Distinct Primes
Count Distinct Primes
Count Distinct Primes
You are given an integer N and your task is to compute the number of distinct prime numbers in the range \( [1, N] \). In other words, determine how many prime numbers \( p \) exist such that \( 1 \le p \le N \).
For example, when \( N = 10 \), the primes in the range are \(2, 3, 5, 7\), so the answer is 4. Similarly, when \( N = 15 \), the primes are \(2, 3, 5, 7, 11, 13\) and the answer is 6.
The input will consist of multiple test cases. For each test case, output the corresponding number on a new line.
inputFormat
The first line contains an integer \( T \) denoting the number of test cases. Each of the next \( T \) lines contains one integer \( N \). \( N \) satisfies \( 0 \leq N \).
outputFormat
For each test case, output a single line with the number of distinct prime numbers in the range \( [1, N] \).
## sample4
10
15
1
2
4
6
0
1
</p>