#include
using namespace std;
#define ll long long
#define pb push_back
bool v[100000005]
vectorprime_vector;
void sieve()
{
for(ll i=2;i<100000005;i+=2)
{
v[i]=true;
}
prime_vector.pb(2);
for(ll i=3;i<100000005;i+=2)
{
if(!v[i])
{
prime_vector.pb(i);
for(ll j=i;(ji)<100000005;j+=2)
{
if(!v[ji])
v[j*i]=true;
}
}
}
}
int main() {
int t;
cin>>t;
int k;
sieve();
while(t–)
{
cin>>k;
k–;
cout<<prime_vector[k]<<endl;
}
return 0;
}
So much error please help
there is no option for copying this code and paste it at coding blocks ide and save it.
@jaiskid I wrote this long code. and there no option to paste it. please sir tell me how I can paste a code there. It will help me.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.