# include & lt; Iostream>
# include & lt; Cmath>
# include & lt; Cstring>
using namespace std;
Bool mark [1000000005];
Int n, s, e;
Void XXS ()
{
If (s==1)
S +=1;
For (int I=2; i <=e; I++)
{
if (! Mark [I])
{
For (int j=I * I; J & lt;=e; J +=I)
Mark [j]=1;
}
}
For (int I=s; i <=e; I++)
if (! Mark [I])
Cout & lt; }
Int main ()
{
//for (int I=2; i <=1000000005; I++)
//mark [I]=1;
Cin & gt;> n;
While (n -)
{
Cin & gt;> S & gt;> e;
Memset (mark, false, sizeof (mark));
XXS ();
Cout & lt;}
return 0;
}
Bosses, take A look at this WA code ( W onderful A nswer)
CodePudding user response:
No title, no wrong answers?CodePudding user response:
Which is a dynamic array you this?And you want to achieve what demand also didn't say clear, this is you want to find prime Numbers?
CodePudding user response: