What is the problem of my code?

any one help me please?

What is the problem of my code?

any one help me please?

Code: Select all

```
#include<stdio.h>
#include<math.h>
bool flag[10000001];
long int x,y,n;
void sieve(long int L,long int U)
{
long int i,j,d;
d=U-L+1;
for (i=0;i<d;i++) flag[i]=true;
for (i=(L%2!=0);i<d;i+=2) flag[i]=false;
for (i=3;i<=sqrt(U);i+=2) {
if (i>L && !flag[i-L]) continue;
j=L/i*i;
if (j<L) j+=i;
if (j==i) j+=i;
j-=L;
for (;j<d;j+=i) flag[j]=false;
}
if (L<=1) flag[1-L]=false;
if (L<=2) flag[2-L]=true;
}
void solve_it()
{
if(n%2==1)
{
printf("2 3 ");
n=n-5;
}
else
{
printf("2 2 ");
n=n-4;
}
x=3;
y=n-3;
while(1)
{
if(flag[x-1]&&flag[y-1])
break;
x=x+2;
y=y-2;
}
printf("%ld %ld\n",x,y);
}
void main()
{
sieve(1,10000000);
while(scanf("%ld",&n)==1)
{
if(n<8)printf("Impossible.\n");
else if(n==8)printf("2 2 2 2\n");
else solve_it();
}
}
```