#include using namespace std; bool prime[100001]; void SieveOfEratosthenes(int n) { for (int p=2; p*p<=n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p] == true) { // Update all multiples of p for (int i=p*2; i<=n; i += p) prime[i] = false; } } } int main() { int t; cin>>t; for(int i=1;i<=100000;i++) prime[i]=1; prime[1]=0; SieveOfEratosthenes(100000); while(t--){ int n; cin>>n; int count=0; for(int i=1;i<=n;i++){ if(prime[i]) count++; } // for(int i=1;i<=10;i++) cout<