semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
  int num;
  scanf("%d",&num);
 if(num>9999&&num<100000)
 {int ten_thousand,thousand,hundred,ten,a;
	 ten_thousand=(int)(num/10000);
  thousand=(int)(num-ten_thousand*10000)/1000;
  hundred=(int)(num-ten_thousand*10000-thousand*1000)/100;
  ten=(int)(num-ten_thousand*10000-thousand*1000-hundred*100)/10;
 a=(int)(num-ten_thousand*10000-thousand*1000-hundred*100-ten*10);
printf("%d%d%d%d%d\n",a,ten,hundred,thousand,ten_thousand);
 }
else
 if (num>999&&num<10000)
 {int ten_thousand,thousand,hundred,ten,a;
	 ten_thousand=(int)(num/10000);
  thousand=(int)(num-ten_thousand*10000)/1000;
  hundred=(int)(num-ten_thousand*10000-thousand*1000)/100;
  ten=(int)(num-ten_thousand*10000-thousand*1000-hundred*100)/10;
 a=(int)(num-ten_thousand*10000-thousand*1000-hundred*100-ten*10);
printf("%d%d%d%d\n",a,ten,hundred,thousand);
 }
else
 if (num>99&&num<1000)
 {int ten_thousand,thousand,hundred,ten,a;
	ten_thousand=(int)(num/10000);
  thousand=(int)(num-ten_thousand*10000)/1000;
  hundred=(int)(num-ten_thousand*10000-thousand*1000)/100;
  ten=(int)(num-ten_thousand*10000-thousand*1000-hundred*100)/10;
 a=(int)(num-ten_thousand*10000-thousand*1000-hundred*100-ten*10);
printf("%d%d%d\n",a,ten,hundred);
 }
else
 if (num>9&&num<100)
 {int ten_thousand,thousand,hundred,ten,a;
	 ten_thousand=(int)(num/10000);
  thousand=(int)(num-ten_thousand*10000)/1000;
  hundred=(int)(num-ten_thousand*10000-thousand*1000)/100;
  ten=(int)(num-ten_thousand*10000-thousand*1000-hundred*100)/10;
 a=(int)(num-ten_thousand*10000-thousand*1000-hundred*100-ten*10);
printf("%d%d\n",a,ten);
 }
else
 if (num>0&&num<10)
 {int ten_thousand,thousand,hundred,ten,a;
	 	 ten_thousand=(int)(num/10000);
  thousand=(int)(num-ten_thousand*10000)/1000;
  hundred=(int)(num-ten_thousand*10000-thousand*1000)/100;
  ten=(int)(num-ten_thousand*10000-thousand*1000-hundred*100)/10;
 a=(int)(num-ten_thousand*10000-thousand*1000-hundred*100-ten*10);
printf("%d\n",a);
 }
return 0;
}
int main(int argc, char* argv[])
{  
	 
       int number;

 

      

       int reversed_number = 0;

       

     

       int remainder = 0;

       

       scanf("%d",&number);


       while(number != 0){

              remainder = number % 10;

              reversed_number *= 10;

              reversed_number += remainder;

              number /= 10;

       }

 

     

       printf("%d\n",reversed_number);

       



	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	if(n>9999)
	{
		int a,b,c,d,e;
		a=n%10;
		b=(n%100-a)/10;
		c=(n%1000-10*b-a)/100;
		d=(n%10000-100*c-10*b-a)/1000;
		e=n/10000;
		printf("%d%d%d%d%d\n",a,b,c,d,e);
	}
	else
	if(n>999)
	{
		int a,b,c,d;
		a=n%10;
		b=(n%100-a)/10;
		c=(n%1000-10*b-a)/100;
		d=n/1000;
		printf("%d%d%d%d\n",a,b,c,d);
	}
	else
	if(n>99)
	{
		int a,b,c;
		a=n%10;
		b=(n%100-a)/10;
		c=n/100;
		printf("%d%d%d\n",a,b,c);
	}
	else
	if(n>9)
	{
		int a,b;
		a=n%10;
		b=n/10;
		printf("%d%d\n",a,b);
	}
	else
		printf("%d\n",n);
	
	return 0;
}
void print(int n)
{
      int p=n;int i;
      if(p/10!=0)
      {
         for(i=0;p/10!=0;i++)
         {
                         int temp=p/10;
                         p=p-10*temp;
         }
         printf("%d",p);
         n=n/10;
         print(n);
      }
      else
      printf("%d",n);
}
     


main()
{
      int number,i;
      scanf("%d",&number);
      print(number);
    }
int main(){
  int n,a,b,c,d,e;
  scanf("%d",&n);
  a=n/10000;
  b=n/1000-a*10;
  c=n/100-100*a-10*b;
  d=n/10-1000*a-100*b-10*c;
  e=n%10;
  if(a!=0){n=10000*e+1000*d+100*c+10*b+a;
  }else if(a==0&&b!=0){n=1000*e+100*d+10*c+b;
  }else if(b==0&&c!=0){n=100*e+10*d+c;
  }else if(c==0&&d!=0){n=10*e+d;
  }else if(d==0&&e!=0){n=n;
  }
    
    printf("%d",n);
   return 0;
  }
void main()
{
int x,a,b,c,d,e;
scanf("%d",&x);
a=x/10000;
b=(x-a*10000)/1000;
c=(x-a*10000-b*1000)/100;
d=(x-a*10000-b*1000-c*100)/10;
e=x-a*10000-b*1000-c*100-d*10;
if(a!=0)
x=e*10000+d*1000+c*100+b*10+a;
else if(b!=0)
x=e*1000+d*100+c*10+b;
else if(c!=0)
x=e*100+d*10+c;
else if(d!=0)
x=e*10+d;
printf("%d",x);
}
int main()
{
	int n;
	scanf("%d",&n);
	int a,b,c,d,e;
	a=n%10;
	b=(n%100-n%10)/10;
	c=(n%1000-n%100)/100;
	d=(n%10000-n%1000)/1000;
	e=(n%100000-n%10000)/10000;
	if(a==0)
	{
		printf("0\n");
	}
    else if(a!=0&&b==0)
	{
		printf("%d\n",a);

	}
	else if(a!=0&&b!=0&&c==0)
	{
		printf("%d",a*10+b);
	}
	else if(a!=0&&b!=0&&c!=0&&d==0)
	{
		printf("%d",a*100+b*10+c);
	}
	else if(a!=0&&b!=0&&c!=0&&d!=0&&e==0)
	{
		printf("%d",a*1000+b*100+c*10+d);
	}
	else
	{
		printf("%d",a*10000+b*1000+c*100+d*10+e);
	}
	return 0;
}
void main()
{
	char a[5];
	int i;
	for(i=0;i<5;i++)
	    scanf("%c",&a[i]);
	for(i=4;i>=0;i--)
		printf("%c",a[i]);
}
int main()
{
   int a[5],i=0,k,num;        //a[5]???????????,i,k????,num?????????
   cin>>num;
   do{
        a[i]=num%10;            
        num=num/10;            
        i++;                   
      }while(num!=0);           
   k=i;
   for(i=0;i<k;i++)                
     cout<<a[i];          
}
int main(int argc, char* argv[])
{
	int x,x1,x2,x3,x4,x5,y;
	scanf("%d",&x);
	x1=x/10000;
    x2=(x-10000*x1)/1000;
	x3=(x-1000*x2-10000*x1)/100;
	x4=(x-10000*x1-1000*x2-100*x3)/10;
	x5=x-10000*x1-1000*x2-100*x3-10*x4;
	if(x1==0)
	{	
		y=x5*1000+x4*100+x3*10+x2;
		{
			if(x2==0)
				y=x5*100+x4*10+x3;
			{
				if(x3==0)
				y=x5*10+x4;
            }
		}
	}
	else 
		y=x5*10000+x4*1000+x3*100+x2*10+x1;
    printf("%d\n",y);
	return 0;
}
void main()
{
	int a,b,c,d,e,m,n;
	scanf("%d",&m);
	if(m<=0)
		printf("please inpue an int >0");
	else if(m<=9)
		printf("%d\n",m);
	else if(m<=99)
	{d=m/10;e=m-10*d;
      n=10*e+d;
	  
	}
	else if(m<=999)
	{c=m/100;d=m/10-10*c;e=m-100*c-10*d;
	n=100*e+10*d+c;
	}
	else if(m<=9999)
	{b=m/1000;c=m/100-10*b;
	d=m/10-100*b-10*c;
	e=m-1000*b-100*c-10*d;
	n=1000*e+100*d+10*c+b;
	}
	else if(m<=99999)
	{a=m/10000;b=m/1000-10*a;
	c=m/100-100*a-10*b;d=m/10-1000*a-100*b-10*c;
	e=m-10000*a-1000*b-100*c-10*d;
	n=10000*e+1000*d+100*c+10*b+a;
	}
	printf("%d\n",n);
}
int main()
{
	char a[5],b[5],c[5],d[5],e;
	int i=0,l;
	gets(a);
    gets(b);
    gets(c);
    gets(d);
	while(a[i]!='\0')
	{
		i=i+1;
	}
	for(l=0;l<i/2;l++)
	{
		e=a[l];
		a[l]=a[i-1-l];
		a[i-1-l]=e;
	}
	i=0;
	while(b[i]!='\0')
	{
		i=i+1;
	}
	for(l=0;l<i/2;l++)
	{
		e=b[l];
		b[l]=b[i-1-l];
		b[i-1-l]=e;
	}
	i=0;
    while(c[i]!='\0')
	{
		i=i+1;
	}
	for(l=0;l<i/2;l++)
	{
		e=c[l];
		c[l]=c[i-1-l];
		c[i-1-l]=e;
	}
	i=0;
	while(d[i]!='\0')
	{
		i=i+1;
	}
	for(l=0;l<i/2;l++)
	{
		e=d[l];
		d[l]=d[i-1-l];
		d[i-1-l]=e;
	}
	i=0;
	puts(a);
	puts(b);
	puts(c);
	puts(d);
	return 0;
}
void main()
{
	int a[10000];
	int n, b, i;
	b = 0;
	scanf("%d",&n);
	for (i=0; n!=0; i++)
	{
		a[i] = n%10;
		n = n / 10;
		b = b + 1;
	}
	for (i = 0; i<b; i++)
	{
		printf("%d",a[i]);
	}
}
int main()
{
  char a,b,c,d,e;
  a=b=c=d=e=0;
  scanf("%c%c%c%c%c",&a,&b,&c,&d,&e);
  if(e!='\n'&&e)
    putchar(e);
  if(d!='\n'&&d)
    putchar(d);
  if(c!='\n'&&c)
    putchar(c);
  if(b!='\n'&&b)
    putchar(b);
  putchar(a);
}
int main()
{
   int k,a,b,c,d,e,f;
   scanf("%d",&k);
   k<100000;
   if(k/10000 != 0)
   a=k/10000;
   b=k/1000-10*a;
   c=k/100-100*a-10*b;
   d=k/10-1000*a-100*b-10*c;
   e=k/1-a*10000-b*1000-c*100-d*10;
   f=e*10000+d*1000+c*100+b*10+a*1;
   if(k/10000==0)
{
   if(k/1000!=0)
   a=k/1000;
   b=k/100-a*10;
   c=k/10-a*100-b*10;
   d=k/1-a*1000-b*100-c*10;
   f=d*1000+c*100+b*10+a*1;
   if(k/1000==0)
{ 
   if(k/100!=0)
   a=k/100;
   b=k/10-10*a;
   c=k/1-a*100-b*10;
   f=c*100+b*10+a*1;

   if(k/100==0)
{
   if(k/10!=0)
   a=k/10;
   b=k/1-a*10;
   f=b*10+a*1;
   if(k/10==0)
{
   if(k/1!=0)
   f=k;
}
}
}
}
   printf("%d",f);
   return 0;
}
int main()
{
	int n,m,i,j=2;

	scanf("%d",&n);
	for(i=1;i<j;i++)
	{
		m=(int)(n/pow(10,i-1))%10;
		if(m==0)
			break;
		else
		{
			j++;
			printf("%d",m);
		}
	}
	return 0;
}
void main()
{
	int n,k,i,j;
	scanf("%d",&n);
	for(k=1;k<=5;k++)
	{
		int t=1;
		for(j=1;j<=k;j++)
			t=t*10;
		if((n/t)>=10)
			continue;
		else
		{
			break;
		}
	}
	for(i=1;i<=k;i++)
	{
		int t=1;
		for(j=1;j<=i;j++)
			t=t*10;
		printf("%d",(n%t-n%(t/10))/(t/10));
	}                                                          
	if(n>=10)
	{
    int t=1;
	for(j=1;j<=k;j++)
		t=t*10;
	printf("%d",n/t);
	}
}
void main()
{
  int num,i,num2=0,b;
  scanf("%d",&num);
  for(i=1;i<=6;i++)
   {
    b=num%10;
    num=num/10;
    if(b!=0) num2=num2*10+b;
      }
printf("%d",num2);
}
void main()
{
	int m,n;
	scanf("%d",&n);
	char str[10];
	sprintf(str,"%d",n);
	m=strlen(str);
	char *p;
	p=str;
	for(p=str+m-1;p>=str;p--)
		printf("%c",*p);
}
void main()
{
	int m[5],n,i;
	scanf("%d",&n);
	for(i=0;i<5;i++)
	{
	    m[0]=n/10000;
 	    m[1]=n/1000-10*m[0];
	    m[2]=n/100-100*m[0]-10*m[1];
	    m[3]=n/10-1000*m[0]-100*m[1]-10*m[2];
	    m[4]=n-10000*m[0]-1000*m[1]-100*m[2]-10*m[3];
	}
	for(i=4;i>=0;i--)
	{
		if(m[i]!=0)
		    printf("%d",m[i]);
	}
}
int main(int argc, char* argv[])
{
	int n;
	int a,b,c,d,e;
	scanf("%d",&n);
	if(n<10)
		printf("%d\n",n);
	if(10<n&&n<100)
	{
		a=n/10;
		b=n-10*a;
		printf("%d\n",10*b+a);
	}
	if(100<n&&n<1000)
	{
		a=n/100;
		b=(n-a*100)/10;
		c=n-a*100-b*10;
		printf("%d\n",100*c+10*b+a);
	}
	if(1000<n&&n<10000)
	{
		a=n/1000;
		b=(n-a*1000)/100;
		c=(n-a*1000-b*100)/10;
		d=n-a*1000-b*100-c*10;
		printf("%d\n",1000*d+100*c+10*b+a);
	}
	if(10000<n&&n<100000)
	{
		a=n/10000;
		b=(n-a*10000)/1000;
		c=(n-a*10000-b*1000)/100;
		d=(n-a*10000-b*1000-c*100)/10;
		e=n-a*10000-b*1000-c*100-d*10;
		printf("%d\n",10000*e+1000*d+100*c+10*b+a);
	}
	return 0;
}
void main()
{
	int a, b, c, d, e, f;
	scanf("%d", &a);
	if(a<100)
	{
		b=a/10;
	    c=a-(b*10);
	    a=10*c+b;
	    printf("%d\n", a);
	}
	else if(a<1000)
	{
		b=a/100;
		c=(a-100*b)/10;
		d=(a-100*b-10*c);
		a=100*d+10*c+b;
		printf("%d\n", a);
	}
	else if(a<10000)
	{
		b=a/1000;
		c=(a-1000*b)/100;
		d=(a-1000*b-100*c)/10;
		e=a-1000*b-100*c-10*d;
		a=1000*e+100*d+10*c+b;
		printf("%d\n", a);
	}
	else if(a<100000)
	{
		b=a/10000;
		c=(a-10000*b)/1000;
		d=(a-10000*b-1000*c)/100;
		e=(a-10000*b-1000*c-100*d)/10;
		f=a-10000*b-1000*c-100*d-10*e;
		a=10000*f+1000*e+100*d+10*c+b;
		printf("%d\n", a);
	}
	
}
int main()
{
	int a[6];
	int i;
	scanf("%d",&i);
	a[5]=i/10000;
	a[4]=(i-a[5]*10000)/1000;
	a[3]=(i-a[5]*10000-a[4]*1000)/100;
	a[2]=(i-a[5]*10000-a[4]*1000-a[3]*100)/10;
	a[1]=(i-a[5]*10000-a[4]*1000-a[3]*100-a[2]*10)/1;
	int j;
	int n=0;
	int t;
	int k;
	for(j=1;j<=5;j++)
	{
		if(a[j]!=0)
		{
			n++;
		}
	}
	for(j=1;j<=(n+1)/2;j++)
	{
		t=a[j];
		a[j]=a[n-j+1];
		a[n-j+1]=t;
	}
	for(k=n;k>=1;k--)
	{
		printf("%d",a[k]);
	}
	return 0;
}
int main()
{
int n,i,a;
scanf("%d",&n);
while(n>0)
{
a=n%10;
n=n/10;
i++;
printf("%d",a);
}
return 0;
}
void main()
{
  int x,i=0,l,a[5];
  scanf("%d",&x);
 while  (x>0)
  {
	 a[i]=x-x/10*10;
	 x=x/10;
	 i++;
  }
  l=i;
  for (i=0;i<l;i++)
  printf("%d",a[i]);
}
int main()
{
	int a[10];
	int i,k,s;
	cin>>s;
	for(i=0;i<5;i++)
	{
		a[i]=s%10;
		s=s/10;
		if(s==0) {k=i;break;}
	}
	for(i=0;i<=k;i++)
	{
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}
void change(char s[],int i);

void main()
{
	char s[6];
	int i;
	gets(s);
	for(i=0;i<6;i++)
	if(s[i]=='\0')break;
	change(s,i);
}

void change(char s[],int i)
{
	if(i==1)putchar(s[0]);
	else
	{
		printf("%c",s[i-1]);
		change(s,i-1);
	}
}
int main()
{
	int a,b;
	cin >>a;
	b=0;
	while (a!=0)
	{
		b=b*10+a%10;
		a=a/10;
	}
	cout <<b<<endl;
	return 0;
}
int main()
{
	int y,i,k,p[5];
	scanf("%d",&y);
	i=0;
	do
	{
		p[i]=y%10;i++;y=y/10;
	}
	while(y/10<10&&y/10>=1);
	p[i]=y;
	for(k=0;k<=i;k++) 
		printf("%d",p[k]);

	return 0;
}
int main()                                //???
{
	int A,a,b,c,d,e;                      //????????
	cin>>A;                               //????
	a=A/10000;                            //????
	b=A/1000-a*10;
	c=A/100-a*100-b*10;
	d=A/10-a*1000-b*100-c*10;
	e=A%10;
	if(a==0)                              //??????????????
		if(b==0)
			if(c==0)
				if(d==0)
					cout<<e<<endl;
				else cout<<e<<d<<endl;
			else cout<<e<<d<<c<<endl;
		else cout<<e<<d<<c<<b<<endl;
	else cout<<e<<d<<c<<b<<a<<endl;
	return 0;
}                                         //????
int main()
{
	
	char a,b,c,d,e;
int i=0;
scanf("%c%c%c%c%c",&a,&b,&c,&d,&e);
if(i!='\n')
printf("%c%c%c%c%c\n",e,d,c,b,a);
return 0;
}
int main(int argc, char* argv[])
{   
	char str[10],a;
	int i=0,n;
	gets(str);
	char *p=str;
	do{
         i++;
		 p++;
		 a=*p;
	}while(a!='\0');
	n=i;
	char s[10];
	for(i=0;i<n;i++)s[i]=str[n-i-1];
	for(i=0;i<n;i++)printf("%c",s[i]);
    return 0;
}
int main(){
	int a;
	scanf("%d",&a);
	int b,c,d,e,f,k;
	b=a/10000;
	c=a/1000-(b*10);
	d=a/100-(b*100)-(c*10);
	e=a/10-(b*1000)-(c*100)-(d*10);
	f=a-(b*10000)-(c*1000)-(d*100)-(e*10);
	k=f*10000+e*1000+d*100+c*10+b;
	for(int i=0;i<4;i++){
		if(k%10==0){
			k=k/10;
		}
	}
	printf("%d",k);
	return 0;
}
void main()
{
	int a,b,c,d,e,f;
	scanf("%d",&a);
    b=a/10000;
    c=a%10000/1000;
    d=a%1000/100;
    e=a%100/10;
    f=a%10;
    if (b!=0) printf("%d%d%d%d%d\n",f,e,d,c,b);
	else if(c!=0) printf("%d%d%d%d\n",f,e,d,c);
	else if(d!=0) printf("%d%d%d\n",f,e,d);
    else if(e!=0) printf("%d%d\n",f,e);
    else printf("%d\n",f);
}
void main()
{
	int m = 0;
	int n;

	scanf("%d", &n);
	int a[5];
	int i = 0;
	while(n>=1)
	{
		a[i] = n%10;
		n = (int)(n/10);
		i++;
	}
	int k = 0 ; 
	int j = 0 ;
	for(j = i; j >0; j--, k ++)
	{
		m = 10*m + a[k];
	}
	printf("%d", m);
}
void main()
{
long x;
	int a=0;
	int b=0;
	int c=0;
	int d=0;
	int e=0;
   scanf("%ld",&x);
   if(x/10000) {
	   a=x/10000;
       b=(x-10000*a)/1000;
	   c=(x-10000*a-1000*b)/100;
	   d=(x-10000*a-1000*b-100*c)/10;
	   e=x-10000*a-1000*b-100*c-d*10;
	   printf("%d%d%d%d%d",e,d,c,b,a);

   
   }
   else if(x/1000) {
	   a=x/1000;
	    b=(x-1000*a)/100;
		c=(x-1000*a-100*b)/10;
		d=x-100*a-100*b-10*c;
		printf("%d%d%d%d",d,c,b,a);
	}
   else if(x/100) {a=x/100;
	
	  b=(x-100*a)/10;
	  c=x-100*a-10*b;
	  printf("%d%d%d",c,b,a);
	}
   else if(x/10){ a=x/10;
	
       b=x-10*a;
	   printf("%d%d",b,a);

	}
   else{ a=x;printf("%d",a);}
}
int main(){
	int n,a,b,c,d,e;
	scanf("%d",&n);
	if(n/10000>0){
		a=n/10000;
		b=(n-a*10000)/1000;
		c=(n-a*10000-b*1000)/100;
		d=(n-a*10000-b*1000-c*100)/10;
		e=n-a*10000-b*1000-c*100-d*10;
		n=a+b*10+c*100+d*1000+e*10000;
		printf("%d",n);
	}
	else{
		if(n/10000==0&&n/1000>0){
			a=n/1000;
			b=(n-a*1000)/100;
			c=(n-a*1000-b*100)/10;
			d=(n-a*1000-b*100-c*10)/1;
			n=a+b*10+c*100+d*1000;
			printf("%d",n);
		}
		else{
			if(n/1000==0&&n/100>0){
				a=n/100;
				b=(n-a*100)/10;
				c=(n-a*100-b*10)/1;
				n=a+b*10+c*100;
				printf("%d",n);
			}
			else{
				if(n/100==0&&n/10>0){
					a=n/10;
					b=(n-a*10)/1;
					n=a+b*10;
					printf("%d",n);
				}
				else
					printf("%d",n);
			}
		}
	}
	return 0;
}
int main()
{
	int n,a,b,c,d,e;
	scanf("%d",&n);
	a=n%10;
	b=((n-a)/10)%10;
	c=((n-a-b*10)/100)%10;
	d=((n-a-10*b-100*c)/1000)%10;
	e=((n-a-10*b-100*c-1000*d)/10000)%10;
	   if(b==0)
	   {
    	printf("%d",a);
	   }
       if(c==0&&b!=0)
	   {
        printf("%d%d",a,b);
	   }
    	if( d==0&&c!=0 )
		{
		printf("%d%d%d",a,b,c);
		}
		if(e==0&&d!=0)
		{
	     printf("%d%d%d%d",a,b,c,d);
		}
		if(e!=0)
			printf("%d%d%d%d%d",a,b,c,d,e);
	return 0;
}
void main()
{
	char c,a[5],mid;
	int n=0,i;
	while ((c=getchar())!='\n')
	{
		a[n]=c;
		n++;
	}
	for (i=0;i<(n/2);i++)
	{
		mid=a[i];
		a[i]=a[n-1-i];
		a[n-1-i]=mid;
	}
	for (i=0;i<=n-1;i++) printf ("%c",a[i]);


}
int main(int argc, char* argv[])
{
	int a,b;
	int shu[5];
	int i;
	scanf("%d",&a);
	b=a;


    int wei=0;
	do{
		a=a/10;
		wei++;
	}while(a!=0);
	
	for(i=0;i<wei;i++){
		shu[i]=b/pow(10,wei-1-i);
		b=b-shu[i]*pow(10,wei-1-i);
	}
    int sum=0;
	for(i=0;i<wei;i++){
		sum=sum+shu[i]*pow(10,i);
	}
	printf("\n%d",sum);
		


	return 0;
}
int main()
{
	int n,a[5],i,j;
	scanf("%d",&n);
	a[0]=n/10000;
	a[1]=(n-a[0]*10000)/1000;
	a[2]=(n-a[0]*10000-a[1]*1000)/100;
	a[3]=(n-a[0]*10000-a[1]*1000-a[2]*100)/10;
	a[4]=(n-a[0]*10000-a[1]*1000-a[2]*100-a[3]*10);
	for(i=4;i>=0;i--)
	{
		if(a[i]==0)
			break;
		printf("%d",a[i]);
	}
	return 0;
}
int main()
{
    int sum=0,n,x[5],i,j=0;
    scanf("%d",&n);
    for (i=0;i<=4;i++)
        {
            if (n>=pow(10,4-i)){
                x[i]=n/pow(10,4-i);
                n= n - x[i]*(pow(10,4-i));
                }
            else x[i]=0;
        }
    for (i=0;i<=4;i++){
        if (x[i]==0) j++;
        }

    for (i=j;i<=4;i++){
        sum = x[i]*(pow(10,i-j))+sum;
        }
    printf("%d",sum);
    return 0;
    }
void main()
{
	char a[5],b[5];
	int i,num;
	for (num=0,i=0;(a[i]=getchar())!='\n';i++)
		num++;
    for (i=0;i<num;i++)
		b[i]=a[num-i-1];
	for (i=0;i<num;i++)
		printf("%c",b[i]);
}
int main()
{
	int a,i,j,n;
	int b[5],tem[6];
	scanf("%d",&a);
	tem[0]=a;
	for(i=0;i<5;i++)
	{
		b[i]=tem[i]%10;
		tem[i+1]=(tem[i]-b[i])/10;
		if(tem[i+1]==0)
		{
			n=i;
			break;
		}
	}
	for(j=0;j<=n;j++)
		printf("%d",b[j]);
	return 0;

}
void main()
{
	char a[5],c;
		int i;
	for(i=0;(c=getchar())!='\n';i++)
		a[i]=c;
	i=i-1;
	while(i>=0)
	{
		c=a[i];
		printf("%c",c);
		i=i-1;
	}
}
int main(int argc, char* argv[])
{
	int a,t;
	scanf("%d",&a);
    if(a>9&&a<100)
	t=a%10*10+a/10;
	if(a>=100&&a<1000)
	t=a%10*100+a/100+a/10*10-a/100*100;
	if(a>=1000&&a<10000)
	t=a%10*1000+a/1000+a/100*10-a/100*100+(a%100-a%10)*10;
	if(a>=10000&&a<=99999)
	t=a%10*10000+a/10000+(a%100-a%10)*100+(a/1000-a/10000*10)*10+(a%1000-a%100);
        printf("%d\n",t);
	return 0;
}
void main()
{
	char a[6];
	int b,c,i;
	scanf("%s",a);
	b=strlen(a);
	for(i=0;i<(b-1)/2;i++)
	{
			a[i]=a[b-i-1]+a[i];
			a[b-i-1]=a[i]-a[b-i-1];
			a[i]=a[i]-a[b-i-1];
	}
	printf("%s\n",a);
}
int main()
{
	int a,b,c,d,e,x,y;
	scanf ("%d",&x);
	a=x/10000;
	b=x%10000/1000;
	c=x%1000/100;
	d=x%100/10;
	e=x%10;
	if (x>=10000)
		printf ("%d\n",10000*e+1000*d+100*c+10*b+a);
	else if (x>=1000)
		printf ("%d\n",1000*e+100*d+10*c+b);
	else if (x>=100)
        printf ("%d\n",100*e+10*d+1*c);
	else if (x>=10)
		printf ("%d\n",10*e+1*d);
	else
		printf ("%d\n",e);
    return 0;
}
void main()
{
int a[5];
int i;
for(i=0;i<=4;i++)
a[i]='0';
scanf("%c%c%c%c%c",&a[4],&a[3],&a[2],&a[1],&a[0]);
for(i=0;i<=4;i++)
if((a[i]>='1')&&(a[i]<='9'))
printf("%c",a[i]);
}
void main()
{
	int a[5]={0},n,s,r,b,j,i,t;
	scanf("%d",&n);
	s=0;
	for(r=0;r<5;r++)
	{
		a[r]=n%10;
		n=n/10;
	}
	for(b=0;b<5;b++)
	{
				
		if(a[b]!=0)
		{   s=s*10;
			s=a[b]+s;
		}
		else
			s=s;
	}
	printf("%d\n",s);
}
void main()
{
	int n,a,b,c,d,e;
	scanf("%d",&n);
	if(n>9999)
	{
		a=n/10000,b=(n-a*10000)/1000,c=(n-a*10000-b*1000)/100,d=(n-a*10000-b*1000-c*100)/10,e=n%10;
		printf("%d%d%d%d%d\n",e,d,c,b,a);
	}
	else if(n>999)
	{
		a=n/1000,b=(n-a*1000)/100,c=(n-a*1000-b*100)/10,d=n%10;
	printf("%d%d%d%d\n",d,c,b,a);
	}
	else if(n>99)
	{
		a=n/100,b=(n-a*100)/10,c=n%10;
	printf("%d%d%d\n",c,b,a);
	}
	else if(n>9)
	{
		a=n/10,b=n%10;
	printf("%d%d\n",b,a);
	}
	else printf("%d",n);
}
int main()
{
	int n,i,j;
	char c[5];
	scanf("%s",&c);
	n=strlen(c);
	for(i=0;i<n;i++)
	{
		j=n-i-1;
		printf("%c",c[j]);
	}
	return 0;
}
int main()
{
	void a(int b,int n);
	int c,d;
	scanf("%d",&c);
	a(c,5);
}


void a(int b,int n)
{
	if (n==1)
	{if(b%10!=0) printf("%d",b%10);
	}
	else {if(b%10!=0) {printf("%d",b%10);}b=b/10;a(b,n-1);}
}
void main()
{
	int a,b,c,d,e,f,g,h,i,j,k;
	scanf("%d",&a);
		if (a/10==0) { b=a; printf("%d",b);}
		else if (a/100==0) {c=a/10; b=a-c*10;g=b;h=c;printf("%d%d",g,h);}

		else if (a/1000==0){ d=a/100 ;c=(a-100*d)/10; b=a-d*100-c*10;g=b;h=c;i=d;printf("%d%d%d",g,h,i);}

		else if (a/10000==0){ e=a/1000 ;d=(a-1000*e)/100 ; c=(a-1000*e-d*100)/10; b=a-1000*e-100*d-10*c;g=b;h=c;i=d;j=e;printf("%d%d%d%d",g,h,i,j);}
		else if (a/100000==0){ f=a/10000; e=(a-10000*f)/1000; d=(a-10000*f-1000*e)/100 ;c=(a-10000*f-1000*e-100*d)/10; b=a-10000*f-1000*e-100*d-10*c;g=b;h=c;i=d;j=e;k=f;printf("%d%d%d%d%d",g,h,i,j,k);}




}
void main()
{
int a,b,c,d,e,x;
scanf("%d",&x);
a=x%10;
e=x/10000;
d=(x-10000*e)/1000;
c=(x-10000*e-1000*d)/100;
b=(x-10000*e-1000*d-100*c)/10;
if(a!=0)printf("%d",a);
if(b!=0)printf("%d",b);
if(c!=0)printf("%d",c);
if(d!=0)printf("%d",d);
if(e!=0)printf("%d",e);
}
int main()
{
	char n[5];
	char *p;
	int l,a,b;
	scanf("%s",&n);
	p=n;
	l=strlen(n);
	if(l==1)
	{
		printf("%s",n);
	}
	else if(l==2)
	{
		a=*p;
		*p=*(p+1);
		*(p+1)=a;
		printf("%s",n);
	}
	else if(l==3)
	{
		a=*p;
		*p=*(p+2);
		*(p+2)=a;
		printf("%s",n);
	}
	else if(l==4)
	{
		a=*p;
		b=*(p+1);
		*p=*(p+3);
		*(p+1)=*(p+2);
		*(p+3)=a;
		*(p+2)=b;
		printf("%s",n);
	}
	else if(l==5)
	{
		a=*p;
		b=*(p+1);
		*p=*(p+4);
		*(p+1)=*(p+3);
		*(p+4)=a;
		*(p+3)=b;
		printf("%s",n);
	}
	return 0;
}
void main()
{
	int a;
	int c1,c2,c3,c4,c5;
	int d1,d2,d3,d4,d5;
	scanf("%d",&a);
	c1=a/10000; d1=a%10000;
	c2=d1/1000; d2=d1%1000;
	c3=d2/100;  d3=d2%100;
	c4=d3/10;   d4=d3%10;
	c5=d4;
	if(c5) printf("%d",c5);
	if(c4) printf("%d",c4);
	if(c3) printf("%d",c3);
	if(c2) printf("%d",c2);
	if(c1) printf("%d",c1);
}
int main()
{
    int n,m,a,b,c,d,e;
    scanf("%d",&n);
    a=(int)(n/10000);
    b=(int)((n-a*10000)/1000);
    c=(int)((n-a*10000-b*1000)/100);
    d=((int)(n-a*10000-b*1000-c*100)/10);
    e=n%10;
    if(a!=0&&b!=0&&c!=0&&d!=0&&e!=0)
       m=e*10000+d*1000+c*100+b*10+a;
     if(a==0&&b!=0&&c!=0&&d!=0&&e!=0)
         m=e*1000+d*100+c*10+b;
    if(a==0&&b==0&&c!=0&&d!=0&&e!=0)
        m=e*100+d*10+c;
     if(a==0&&b==0&&c==0&&d!=0&&e!=0)
        m=e*10+d;
     if(a==0&&b==0&&c==0&&d==0&&e!=0)
        m=e;
      printf("%d\n",m);
     return 0;
}
void main() 
{ 
int num,a,b,c,d,e; 
scanf("%d",&num); 
a=num/10000; 
b=(num-a*10000)/1000; 
c=(num-10000*a-1000*b)/100; 
d=(num-10000*a-1000*b-100*c)/10; 
e=num-10000*a-1000*b-100*c-10*d; 
printf("%d",e); 
if(d) 
printf("%d",d); 
if(c) 
printf("%d",c); 
if(b) 
printf("%d",b); 
if(a) 
printf("%d",a); 
}
void main()
{
	int n,a,b,c,d,e,f;
	scanf("%d",&n);
	a=n/10000;
	b=n/1000-a*10;
	c=n/100-a*100-b*10;
	d=n/10-a*1000-b*100-c*10;
	e=n-a*10000-b*1000-c*100-d*10;
	if(a!=0)
	f=e*10000+d*1000+c*100+b*10+a;
	else
		if(b!=0)
		f=e*1000+d*100+c*10+b;
		else
			if(c!=0)
				f=e*100+d*10+c;
			else
				if(d!=0)
				f=e*10+d;
				else
				f=e;
	printf("%d",f);
}
int main()
{
	int num=0,ge=0,shi=0,bai=0,qian=0,wan=0;      //ge=???????????num??????
	cin>>num;
	wan=num/10000;           
	qian=(num-wan*10000)/1000;
	bai=(num-wan*10000-qian*1000)/100;
	shi=(num-wan*10000-qian*1000-bai*100)/10;
	ge=(num-wan*10000-qian*1000-bai*100-shi*10);  //??????????
	if(shi==0)
		cout<<ge<<endl;
	else if(bai==0)
		cout<<ge<<shi<<endl;
	else if(qian==0)
		cout<<ge<<shi<<bai<<endl;
	else if(wan==0)
		cout<<ge<<shi<<bai<<qian<<endl;
	else
		cout<<ge<<shi<<bai<<qian<<wan<<endl;     //?????????
	return 0;
}
int main()
{
    int num[5]={'\0'};
    long number;
    int i,place=1;

    scanf("%ld",&number);
    do {
    place=1;
    for(i=0;i<=4;i++) {
        num[i]=number%10;
        number/=10;
        if(number!=0) 
            place+=1;
    }
    for(i=0;i<place;i++) 
        printf("%d",num[i]);
    printf("\n");
    scanf("%ld",&number);
    }while(number!=0);
    return 0;
}
void change(char *);
int main()
{
	char *p;
	p = (char*)malloc(5*sizeof(char));
	gets(p);
	
	change(p);
}
void change(char *q){
	char *q0 = q;
	if (*q=='\0') printf("\n");
	else {
        for (;*q!='\0';q++){}
		printf("%c",*(q-1));
		*(q-1)='\0';
		change(q0);
	}
}
int main()
{
	int n,a[10];
	scanf("%d",&n);
	if(n<100){
		a[0]=n%10;
		a[1]=(n-a[0])/10;
		printf("%d%d\n",a[0],a[1]);
	}
	else if(n<1000){
		a[0]=n%100;
		a[1]=(n-a[0])/100;
		a[2]=n-100*a[1];
		a[3]=a[2]%10;
		a[4]=(a[2]-a[3])/10;
		printf("%d%d%d\n",a[3],a[4],a[1]);
	}
	
	else if(n<10000){
		a[0]=n%1000;
		a[1]=(n-a[0])/1000;
		a[2]=a[0]%100;
		a[3]=(a[0]-a[2])/100;
		a[4]=a[2]%10;
		a[5]=(a[2]-a[4])/10;
		printf("%d%d%d%d\n",a[4],a[5],a[3],a[1]);
	}
	else{
		a[7]=n%10000;
		a[6]=(n-a[7])/10000;
		a[0]=a[7]%1000;
		a[1]=(a[7]-a[0])/1000;
		a[2]=a[0]%100;
		a[3]=(a[0]-a[2])/100;
		a[4]=a[2]%10;
		a[5]=(a[2]-a[4])/10;
		printf("%d%d%d%d%d\n",a[4],a[5],a[3],a[1],a[6]);
	}
	return 0;
}
int main()
{
long a,b,c,d;
a=321;
b=54321;
c=12211;
d=98997;
printf("%d\n",a);
printf("%d\n",b);
printf("%d\n",c);
printf("%d\n",d);
return 0;
}