Deepak and prime ||

test case 2 and 3 are giving run error what am i lacking in the code

#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a[100000000+1]={0};
a[2]=1;
for (long long int i=3;i<=100000000;i+=2)
{
a[i]=1;
}
for(long long int i=3;i<=100000000;i+=2)
{
if(a[i])
{
for(long long int j=ii;j<=100000000;j += 2i)
{
a[j]=0;
}
}
}

long long int m,n;
int k;
cin>>k;
while(k--)
{
    cin>>m;
    cin>>n;
    for(long long int i=m;i<=n;i++)
    {
        if(a[i])
        {
            cout<<i<<endl;
         }
    }
    cout<<endl;
}
return 0;

}

dont paste code here as a text because many syntax error arises due to this… please provide ide link…

ide.codingblocks.com/s/83136 ide.codingblocks.com/s/83134\

still not able to score above 71

not getting ans by this approach too

you cannot create array of size 10^9. use segmented seive

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.