For this Question: Find the number of prime numbers before N (Including that number too).The first line of the input contains the number of test cases T.
Next T lines contain the value N.

<b>Constraints</b>
1 <= T <= 1e5
1 <= N <= 1e5Print the number of primes number before that number.Sample Input 1:
2
3
11

Sample Output 1:
2
5, I have written this Solution Code: #include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 2351
#endif

vector<bool> sieve(int n) {
    vector<bool> is_prime(n + 1, true);
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i * i <= n; i++) {
        if (is_prime[i]) {
            for (int j = i * i; j <= n; j += i)
                is_prime[j] = false;
        }
    }
    return is_prime;
}

int main() {
    vector<bool> prime = sieve(1e5 + 1);
    vector<int> prefix(1e5 + 1, 0);
    for (int i = 1; i <= 1e5; i++) {
        if (prime[i]) {
            prefix[i] = prefix[i - 1] + 1;
        } else {
            prefix[i] = prefix[i - 1];
        }
    }
    int tt;
    cin >> tt;
    while (tt--) {
        int n;
        cin >> n;
        cout << prefix[n] << "\n";
    }
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?