semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
	int zhishu(int i);
	long n;
	long num;
	int i;
	scanf("%d",&n);
	for(num=6;num<=n;num=num+2)
	{
	printf("%d=",num);
	if(zhishu(num-2)==1) printf("%d+%d\n",2,num-2);
	else if(sqrt(num)>=3)
	{
		for(i=3;i<=num/2;i=i+2)
		{
			if(zhishu(i)==1&&zhishu(num-i)==1)
			{
				printf("%d+%d\n",i,num-i);
				break;
			}
		}
	}
	else if(sqrt(num)<3)
	{
		for(i=3;i<=num/2;i=i+2)
		{
			if(zhishu(i)==1&&zhishu(num-i)==1)
			{
				printf("%d+%d\n",i,num-i);
				break;
			}
		}
	}
	}
}
int zhishu(int i)
{
	int j;
	if(i==2) return 1;
	else if(i%2==0&&i!=2) return 0;
	else for(j=3;j<i/2;j=j+2)
	{
		if(i%j==0)
		{
			return 0;
			break;
		}
	}
	if(j=i/2+1) return 1;
}
void main()
{
 int n,i,m,j,y,k;
 scanf("%d",&n);
 for(i=6;i<=n;i=i+2)
 {
  for(m=3;m<=i/2;m=m+2)
   {
    for(j=3;j<=sqrt(m);j+=2)
     if(m%j==0)break;
    if(j<=sqrt(m))continue;
    y=i-m;
    for(j=3;j<=sqrt(y);j+=2)
      if(y%j==0)break;
    if(j>sqrt(y)) 
   {
    printf("%d=%d+%d\n",i,m,y);
    break;
    } 
   else
      continue;
   }

  }
}
int judge_zhi(int a)
{
	int i;
	if(a!=2&&a%2==1)
	{
	for(i=2;i<=sqrt(a)+1;i++)
	{
		if(a%i==0)
		{
			return(0);
		     break;
		}
	}
	if(i>=sqrt(a)+1) return(1);
	}
	if(a==2) return(1);
	if(a>2&&a%2==0) return(0);
}

void main()
{
	int n,i,j,m;
	scanf("%d",&m);
	for(n=6;n<=m;n++)
	{
	     if(n%2==1) continue;
		for(i=2;i<n;i++)
		{
		if(judge_zhi(i)==1&&judge_zhi(n-i)==1)
		{
			printf("%d=%d+%d\n",n,i,n-i);
	         break;
		}
		
		}
	}
}
int main()
{
	int i,n,j,k,m,t;
	scanf("%d",&n);
	for(i=6;i<=n;i=i+2)
	{

		for(j=3;j<=i/2;j+=2)
		{
			m=0;
			t=0;
			for(k=3;k<=sqrt(j)+1;k+=2)
			{
				if(j%k==0)
					m=1;
			}
			if(m==0)
			{
				for(k=3;k<=sqrt(i-j)+1;k+=2)
				{
					if((i-j)%k==0)
						t=1;
				}
				if(t==0)
				{
					printf("%d=%d+%d\n",i,j,(i-j));
					break;
				}
			}
		}
	}
	return 0;
}
main()
{
	long n,m,t,i,j,k;
	int p,q,a,b;
	scanf("%ld",&n);
	for(m=6;m<=n;m=m+2)
	{
		printf("%ld=",m);
		for(i=3;i<m;i=i+2)
		{
			t=m-i;
			a=(int)sqrt(i);
			b=(int)sqrt(t);
			for(j=1;j<=a;j=j+2)
			{
				if(i%j==0&&j!=1)
				{p=1;break;}
				else p=0;
			}
			for(k=1;k<=b;k=k+2)
			{
				if(t%k==0&&k!=1)
				{q=1;break;}
				else q=0;
			}
			if(p==0&&q==0)
			{printf("%ld+%ld\n",i,t);break;}
		}
	}
}
int main(){
	int h,k,s,m,i,n;
	int a,b,t=4;    //n????n??,t???????a??????b?????
	scanf("%d",&n);
	for (i=1;i<=(n-4)/2;i++)
	{t=t+2;

	for(a=2;a<=t/2;a++)
	
	{m=0;
		for(k=1;k<=sqrt(a);k++)
		{if (a%k==0)
	      m=m+k;
		}
	s=0;
    if(m==1)
		{b=t-a;
		
			for (h=1;h<=sqrt(b);h++)
			{if(b%h==0)
			s=s+h;
			}
		}
		
	           if(s==1)
			   {printf("%d=%d+%d\n",t,a,b);
	              break;}
	}
	}
	return 0;
}
int main()
{
	int n;
	cin>>n;
	int i;
	for(i=6;i<=n;i=i+2)
	{
		int j=3;
		int k=3,t=0,l=0,p=0;
		do
		{
		   p=0;
		   t=0;
		   l=0;
			for(k=3;k<=sqrt(j);k++)
		{
			if(j%k==0)
				t=1;
		}
		if(t==0)
		{
			for(k=3;k<=sqrt(i-j);k++)
			{
				if((i-j)%k==0)
					l=1;
			}
		}
		if(t==0&&l==0)
		{
			cout<<i<<"="<<j<<"+"<<i-j<<endl;
			//break;
			p=1;
		}
		j=j+2;
		}
		while(p==0);
	}
	return 0;
}
int panduan(int n)
{
    int f=1;
    int i;
    for(i=2;i<=sqrt(n);i++)
    if(n%i==0)
    {
        f=0;
        break;
    }
    return f;
}
int main()
{
    unsigned int n,i,j;

    scanf("%d",&n);
    for( i = 2;i <= n;i+=2)
        for(j=3;j<=i/2;j+=2)
        if(panduan(j))
        {
            if(panduan(i-j))
            {
                printf("%d=%d+%d\n",i,j,i-j);
              break;
            }
		}
}
void main()
{
   int n,i,j,k,h;
   double a,b;
   scanf("%d",&n);
   for(i=6;i<=n;i=i+2)
   { 
	 for(j=3;j<i-2;j=j+2)
     { a=sqrt(j);
       for(k=3;k<=a;k=k+2)
       {  if(j%k==0)break;
	   }
	   if(k>a)
        h=i-j;
        b=sqrt(h);
        for(k=3;k<=b;k=k+2)
        { if(h%k==0)break;
		}
	   if(k>b)break;
	 }
     printf("%d=%d+%d\n",i,j,h);
   }   
}
char res[Max+1];           // ?
char a[Max],b[Max];        // ????!
int len1,len2;
void Init(char *a)
{
int i;
for(i=0; i<Max; i++)
{
   a[i] = '0';
}
return ;
}

void Long_Add(char *res,char *newone)   // res????????????????.
{
int i,j;
int len;
int tempsum;
int carry = 0;                 // ??
len = strlen(newone);
for(i=Max-1,j=len-1; i>=0,j>=0; i--,j--)
{
   tempsum = res[i]-'0'+newone[j]-'0'+carry;
   res[i] = tempsum%10+'0';
   carry = tempsum/10;
}
while(carry > 0)   // ------??????????!
{
   tempsum = res[i]-'0'+carry ;
   res[i] = tempsum%10+'0';
   carry = tempsum/10;
   i--;
}
//------------------- ??????????
for(i=0;i<Max;i++)
   if(res[i] != '0')
    break;
if(i==Max)
printf("0");
else
{ 
int n=i;
for(n;n<Max;n++)
   putchar(res[n]);} 
//--------------------------????????????    !

return ;
}
void Input(char *a,char *b)
{
int i,len;
scanf("%s %s",a,b);
len1=strlen(a);
len2=strlen(b);
Init(res);
len=strlen(a);
for(i=len-1; i>=0; i--)
   res[Max+i-len] = a[i];
}
int main()
{
Input(a,b);
Long_Add(res,b);
return 0;
}
int main()
{
	char a[250],b[250],c[251];
    int i,j,z;
    gets(a);gets(b);
    for(i=0;i<=250;i++)
    c[i]='0';
    i=strlen(a)-1;
    j=strlen(b)-1;
	if (i==0 && j==0) printf("%d\n",0);
    for(z=250;i>=0&&j>=0;i--,j--,z--)
	{
		c[z]=c[z]+a[i]-'0'+b[j]-'0';
        if(c[z]>'9')
		{
			c[z]=c[z]-10;
            c[z-1]++;
		}
	}
    if(i>=0)
    for(;i>=0;i--,z--)
	{
		c[z]=c[z]+a[i]-'0';
        if(c[z]>'9')
		{c[z]=c[z]-10;
        c[z-1]++;
		}
	}
    if(j>=0)
    for(;j>=0;j--,z--)
	{
		c[z]=c[z]+b[j]-'0';
        if(c[z]>'9')
		{
		c[z]=c[z]-10;
        c[z-1]++;
		}
	}
    for(i=0;i<=250;i++)
    {
		if(c[i]!='0')
        break;}
    

    for(;i<=250;i++)
		cout<<c[i];
    return 0;
}
void AddBigInt(char *result,char *str1,char *str2)
{
	int i,j,k,a,b,c;
	int x=0;		
	char c1,c2;
    for(i=0;;i++)		
	{
		if(*(str1+i)=='\0')
		{
			a=i-1;
			break;
		}
	}
	for(i=0;;i++)
	{
		if(*(str2+i)=='\0')
		{
			b=i-1;
			break;
		}
	}
	if(a>b)		
		c=a+1;
	else
		c=b+1;
	*(result+c+1)='\0';	
	for(i=0;c>=i;i++)	
	{						
		if(a<i)
			c1='0';	
		else
			c1=*(str1+a-i);

		if(b<i)
			c2='0';
		else
			c2=*(str2+b-i); 
			*(result+c-i)=(c1-'0'+c2-'0'+x)%10+'0';
		x=(c1-'0'+c2-'0'+x)/10 ;
	}
	if(*result=='0')			
	{				
		for(i=0;*(result+i);i++)
			*(result+i)=*(result+i+1);
	}
}
int main()
{
    int i;
	char str1[251],str2[251],result[251];
	gets(str1);
	gets(str2);
	AddBigInt(result,str1,str2);
	int index = 0;
    for (i = 0; i < strlen(result);i ++) {
        if ('0' != result[i]) {
            index = i;
            break;
        }
    }
    
    char k[250];
    strcpy(k, result+ index);
    printf("%s\n",k);
	return 0;
}
main()
{char str1[250]={0},str2[250]={0},str[251]={0},str3[251]={0};
int a,b,c,i,j,k,l,m,n,h,g,f,o;
scanf("%s",str1);
scanf("%s",str2);
a=strlen(str1);
b=strlen(str2);
if(a==b){
for(i=0;i<a;i++){
str[i]=str1[i]+str2[i]-'0';
}
}
if(a>b){
for(j=0,k=a-b;j<=b-1,k<=a-1;j++,k++){

str[k]=str1[k]+str2[j]-'0';}
for(k=0;k<a-b;k++){
str[k]=str1[k];}

}
if(a<b)
{
for(l=b-1,m=a-1;l>=b-a,m>=0;l--,m--){
str[l]=str1[m]+str2[l]-'0';}
for(l=0;l<b-a;l++){
str[l]=str2[l];}
}
for(n=(a>=b)?a:b-1;n>=1;n--){
if(str[n]>'9'){
str[n]=str[n]-10;
str[n-1]=str[n-1]+1;}}
if(str[0]>'9')
{n=(a>=b)?a:b;
for(h=1;h<n;h++)
{str3[h+1]=str[h];
}
str3[1]=str[0]-10;
str3[0]='1';printf("%s",str3);}
if(str[0]<='9')
{for(g=0;g<strlen(str)-1;g++)
{if(str[0]=='0')
{for(f=0;f<strlen(str)-g-1;f++)
str[f]=str[f+1];str[strlen(str)-g-1]='\n';
}
if(str[0]!='0')
{
break;}}printf("%s",str);} 










 
 
      }
int main()
{
	char str1[251],str2[251];                 //?????250??????????????
	int a[250]={0},b[250]={0},i;               //???????????0 
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));                     //????????0
	cin.getline(str1,250);                       //?????????????????????????????
	cin.getline(str2,250);
	int len1=0,len2=0;
	while(str1[len1]!='\0')          //???0??,????0?ASC???0
	len1++;
	while(str2[len2]!='\0')                //????????????????????????????            
	len2++;
	for(i=len1-1;i>=0;i--)
	a[len1-1-i]=str1[i]-'0';
	for(i=len2-1;i>=0;i--)
		b[len2-i-1]=str2[i]-'0';
for(i=0;i<len1||i<len2;i++)
	{
		if(a[i]+b[i]>=10) {a[i+1]+=1;a[i]=a[i]+b[i]-10;}   
		else a[i]+=b[i];
	}
	int count=249;                   //?????250????????
	while(a[count]==0)                //???????????????????????????0 ?????????????0??
	count--;
	for(i=count;i>=0;i--)                       //??????????????????????
		cout<<a[i];
	if(count<0) cout<<0<<endl;
	return 0;
}
int main(int argc, char* argv[])
{
	char a[251]={'0'},b[251]={'0'},c[260]={'0'},d[260]={'0'};
	int i,al,bl,cl,j,k,p=0;
	char tmp1,tmp2,tmp3,tmp;
	gets(a);
	gets(b);
    al=strlen (a);
	bl=strlen (b);
tmp1='0';tmp2='0';tmp3='0';tmp='0';
	//if (a[al-2]=='7')
		//{al=al;
//printf ("%d\n",al);

	//else
		//al=al-1;
	
	for (i=al-1,j=bl-1,k=0;i>=0||j>=0;i--,j--,k++)
	{
		if (i>=0&&j>=0)
		{
   			
			if (a[i]-48+b[j]+tmp3-48>57)
			{
				tmp2=a[i]-48+b[j]+tmp3-48-10;
				tmp3='1';
				
			}
			else
			{
				tmp1=a[i]-48+b[j]+tmp3-48;
				tmp2=tmp1;
				tmp3='0';
			}
			c[k]=tmp2;
		}
		else if (i<0&&j>=0)
		{
            if (b[j]+tmp3-48>57)
			{
				tmp2=b[j]+tmp3-48-10;
				tmp3='1';
			}
			else
			{
				tmp1=b[j]+tmp3-48;
				tmp2=tmp1;
				tmp3='0';
			}
			c[k]=tmp2;
		}
		else if (i>=0&&j<0)
		{
			if (a[i]+tmp3-48>57)
			{
				tmp2=a[i]+tmp3-48-10;
				tmp3='1';
			}
			else
			{
				tmp1=a[i]+tmp3-48;
				tmp2=tmp1;
				tmp3='0';
			}
			c[k]=tmp2;
		}
	}
	if (tmp3=='1')
	{
		c[k]='1';
	    c[k+1]='\0';
	}
	else c[k]='\0';
    cl=strlen (c);
	for (i=cl-1;i>=0;i--)
	{
		if (c[i]=='0')
			p++;
		else 
			break;
	}
//	printf ("%d%d",p,cl);
	if (cl==1&&c[0]=='0')
		puts(c);
	else{
	for (i=cl-p-1;i>=0;i--)
		d[cl-p-i-1]=c[i];
	d[cl-p]='\0';
	puts (d);
	}
	//printf ("%d %d %d \n",al,bl,cl);
	
	return 0;
}
//POJ ?? 2981 ?????
int main()
{
	char A[300] , B[300];
	int a[300]={0} , b[300]={0} , c[320] = {0}; 
	memset(A,' ',sizeof(B));
	memset(B,' ',sizeof(B));
	cin.getline(A,300);
	cin.getline(B,300);
	int x = strlen(A) , y = strlen(B) ;
	for(int i = x-1; i>=0 ; i--){
		if(A[i]==' ');
		else
			a[x-i] = A[i] - '0';//??A?(?A[0]??)123456??a?(?a[0]??)0654321
	}
	for(int j = y-1; j>=0 ; j--){
		if(B[j]==' ');
		else
			b[y-j] = B[j] - '0';
	}
	for(int k = 0 ; k<x+y ; k++){
		c[k] += a[k] + b[k];
		c[k+1] += c[k]/10;
		c[k] %= 10;
	}
	int remember = 0 ;
	for(int l = x+y ; l>=0 ; l--){
		if(c[l] != 0){
			remember = l ;
			break;
		}
	}
	for(int m = remember ; m>0 ; m--)
		cout<<c[m];
	if(remember==0)
		cout<<0;
	cout<<endl;
	return 0 ;
}
int main()
{   int str2(char*str,int*a);
    int add(int*a,int al,int*b,int bl,int*c);
    int print(int*c,int l);
    char s1[max];
    char s2[max];
    int a[max],b[max],c[max];
    int al,bl,cl;
    scanf("%s%s",s1,s2);
    al=str2(s1,a);
    bl=str2(s2,b);
    cl=add(a,al,b,bl,c);
    print(c,cl);
 
}
int str2(char*str,int*a)
{
    int i,l;
    l=strlen(str);
    for(i=0;i<l;i++){
        a[l-i-1]=str[i]-'0';}
    return l;
}
int add(int*a,int al,int*b,int bl,int*c)
{
    int l=(al>bl)? al:bl;
    int i;
    for(i=0;i<l;i++){
        c[i]=0;
        if(i<al) c[i]+=a[i];
        if(i<bl) c[i]+=b[i];
        }
    c[l]=0;
    for(i=0;i<l;i++){
        if(c[i]>=10){
           c[i+1]+=c[i]/10;
           c[i]=c[i]%10;
           }
           }
    if(c[l]!=0)
    return l+1;
    else 
    return l;
}
int print(int*c,int l)
{
    int i,k;
    k=l-1;
    while (c[k]==0&&k>0){
          k--;
          }
    for (i=k;i>=0;i--){
        printf("%d",c[i]);
        }
}
const int maxlen=255;
int main()
{
	char str1[maxlen],str2[maxlen];
	int a1[maxlen],a2[maxlen];
	memset(a1,0,sizeof(a1));
	memset(a2,0,sizeof(a2));
	cin>>str1>>str2;
	for(int i=0;i<strlen(str1);i++)
		a1[i]=str1[strlen(str1)-1-i]-'0';
	for(int i=0;i<strlen(str2);i++)
		a2[i]=str2[strlen(str2)-1-i]-'0';
	int pos=0;
	for(int i=0;i<maxlen-1;i++)
	{
		int temp=a1[i]+a2[i];
		if(temp>=10)
		{
			a1[i]=temp%10;
			a1[i+1]+=1;
		}
		else
			a1[i]=temp;
		if(a1[i]!=0)
			pos=i;
	}
	for(int i=pos;i>=0;i--)
		cout<<a1[i];
	cout<<endl;
	return 0;
}
char a[300],b[300];
char x[300],y[300];
int he[300],l;
int main()
{
	int i,j;
	cin>>a>>b;
	if (strlen(a)==1&&strlen(b)==1&&a[0]=='0'&&b[0]=='0') cout<<"0"<<endl;
	else
	{
		memset(he,0,sizeof(he));
		memset(x,'0',sizeof(x));
		memset(y,'0',sizeof(y));
		for (i=0;i<strlen(a);i++)
		{
			x[strlen(a)-i-1]=a[i];
		}
		for (i=0;i<strlen(b);i++)
		{
			y[strlen(b)-i-1]=b[i];
		}
		if (strlen(a)>strlen(b))
		{
			l=strlen(a);
			for (i=strlen(b);i<strlen(a);i++)
			{
				y[i]='0';
			}
		}
		else
		{
			l=strlen(b);
			for (i=strlen(a);i<strlen(b);i++)
			{
				x[i]='0';
			}
		}
		for (i=0;i<l;i++)
		{
			he[i]=he[i]+((int)x[i]-48)+((int)y[i]-48);
			if (he[i]>=10)
			{
				he[i+1]++;
				he[i]=he[i]%10;
			}
		}
		for (i=299;i>=0;i--)
		{
			if (he[i]!=0) break;
		}
		for (j=i;j>=0;j--)
			cout<<he[j];
		cout<<endl;
	}
	return 0;
}
int main()
{
	char a[300], b[300], c[300];

	memset(a, '0', sizeof(a));
	memset(b, '0', sizeof(b));
	memset(c, '0', sizeof(c));

	cin.getline(a, 300);
	cin.getline(b, 300);

	int len_a = strlen(a);
	int len_b = strlen(b);
	
	int i, j, temp;
	for (i = 0, j = len_a - 1; i < j; i ++, j --)
	{
		temp = a[i];
		a[i] = a[j];
		a[j] = temp;
	}
	for (i = 0, j = len_b - 1; i < j; i ++, j --)
	{
		temp = b[i];
		b[i] = b[j];
		b[j] = temp;
	}

	//cout << a << endl << b << endl;

	int len = max(len_a, len_b);
	for (i = 0; i < len; i ++)
	{
		int x = a[i] - '0';
		int y = b[i] - '0';
		if (x < 0) x = 0;
		if (y < 0) y = 0;
		int z = x + y + (c[i] - '0');
		if (z < 10)
		{
			c[i] = z + '0';
		}
		else
		{
			c[i + 1] += 1;
			c[i] = z - 10 + '0';
		}
	}

	i = 299;
	while (c[i] == '0' && i >= 0) i --;
	if (i < 0)
		cout << "0" << endl;
	else
	{
		for (; i >= 0; i --)
		{
			cout << c[i];
		}
		cout << endl;
	}

	return 0;
}
int main (){
    int w,p,carry=0,x,y,n0=0,result[260];
    char a[260],b[260];
    gets(a);
    gets(b);
    memset(result,0,sizeof(result));
    w=strlen(a)<=strlen(b)?strlen(a):strlen(b);
    p=strlen(a)>=strlen(b)?strlen(a):strlen(b);
    for ( int i = 0 ; i < p ; i++){
        if (i<=w-1){
        x=a[strlen(a)-1-i]-'0';
        y=b[strlen(b)-1-i]-'0';
        }
        else {
                    if(strlen(a)<=strlen(b)){
                    x=0;
                    y=b[strlen(b)-1-i]-'0';
                    }
                    else {
                    x=x=a[strlen(a)-1-i]-'0';
                    y=0;
                    }
        }
        if (x+y+carry>=10){
        result[i]=x+y+carry-10;
        carry=1;
        }
        else {
        result[i]=x+y+carry;
        carry=0;
        }
        if(i==p-1&&carry==1){
        result[i+1]=carry;
        }
    }
    if (carry==1){
    p++;
    }
    for (int j=p-1;j>=0;j--){
    if(result[j]==0){
        n0++;
        for (int q=p-1;q>=j;q--){
        if (result[q]!=0){
        printf("%d",result[j]);
        break;
        }
        }
    }
    else{
    printf("%d",result[j]);
    }
    if(n0==p){
    printf("%d",result[j]);
    }
    }
return 0;
}
main()
{
	int i;
	char a[533],b[533],c[533];
	cin>>a>>b;
	int al,bl,cl;	
	al=strlen(a);
	bl=strlen(b);
	if(bl>al)
	{
		strcpy(c,a);
		strcpy(a,b);
		strcpy(b,c);
	}	
	al=strlen(a);
	bl=strlen(b);
	cl=al+1;
	for(i=0;i<cl;i++)
	{
		c[i]='0';
	}
	c[cl]='\0';
	for(i=1;i<=bl;i++)
	{
		c[cl-i]=c[cl-i]+a[al-i]+b[bl-i]-'0'-'0';
		if(c[cl-i]>'9')
		{
			c[cl-i]=c[cl-i]-10;
			c[cl-i-1]++;
		}
	}
	for(i=bl+1;i<=al;i++)
	{
		c[cl-i]=c[cl-i]+a[al-i]-'0';
		if(c[cl-i]>'9')
		{
			c[cl-i]=c[cl-i]-10;
			c[cl-i-1]++;
		}
	}
	for(;c[0]=='0'&&cl>1;)
	{
		for(int j=0;j<cl;j++)
		{
			c[j]=c[j+1];
		}
		cl--;
	} 
	cout<<c;
}
int c[252];
main()
{
      int x,y,i,z,m,k;
      char a[251],b[251];
      scanf("%s %s",a,b);
      x=strlen(a);
      y=strlen(b);
      if(x<y)
      {
             for(i=x-1;i>-1;i--)
             a[i+y-x]=a[i];
             for(i=0;i<y-x;i++)
             a[i]='0';
             z=y;
             k=x;
      }
       else if(x>y)
      {
             for(i=y-1;i>-1;i--)
             b[i+x-y]=b[i];
             for(i=0;i<x-y;i++)
             b[i]='0';
             z=x;
             k=y;
      }   
         else
         {
             z=x;
             k=x;
             }
      for(i=z-1;i>=0;i--)
      {
                       m=c[z-1-i]+a[i]+b[i]-'0'-'0';
                       if(m<10)
                       {
                               c[z-1-i]=m;
                       }
                       else
                       {
                           m=m%10;
                           c[z-1-i]=m;
                           c[z-i]++;
                           if(i==0)
                           z++;
                       }
      }
     
      for(i=z-1;i>=0;i--)
      {
                   if(c[i]==0)
                   z--;
                   else
                   break;
      }
       if(z==0)
       printf("0");
       else
      for(i=z-1;i>=0;i--)
      printf("%d",c[i]);
      
}
int main()
{
	char a[251];
	char b[251];
	char f[251];
	int c[252];
	int d[251];
	int e[252];
	int s,j,i,x,y;
	scanf("%s %s",a,b);
	x=strlen(a);
	y=strlen(b);
	e[0]=0;
	if(x<y)
	{
		strcpy(f,a);
		strcpy(a,b);
		strcpy(b,f);
                  s=x;
		x=y;
		y=s;
	}
	for(i=0;i<y;i++)
	{
		d[i]=b[i]-48;
	}
	for(j=0;j<x;j++)
	{
		c[j]=a[j]-48;
	}
	for(i=0;i<y;i++)
	{
		e[x-i]=c[x-i-1]+d[y-i-1];
	}
	for(i=y;i<x;i++)
	{
		e[x-i]=c[x-i-1];
	}
	for(j=x;j>0;j--)
	{
		if(e[j]>9)
		{
			e[j]=e[j]-10;
			e[j-1]=e[j-1]+1;
		}
	}
	if(x>1)
	{
	for(j=0;j<x+1;j++)
	{
		if(e[j]!=0)
		{
			for(i=j;i<x+1;i++)
			{
				printf("%d",e[i]);
			}
				break;
		}
	}
	}
	else
	{
		printf("%d",c[0]);
	}
	return 0;
}
int max(int x, int y)
{
	if(x>=y) return x;
	else return y;
}
int trans(char x) 
{ 
	int y; 
    int s[10]={'0','1','2','3','4','5','6','7','8','9'}; 
    int i; 
    for(i=0;i<10;i++) 
	{
		if(x==s[i]) 
		{ 
			y=i; 
			break; 
		} 
	} 
    return y; 
} 
int main()
{
	char a[251]={'\0'},b[251]={'\0'};
	int A[250]={0},B[250]={0},C[251]={0};
	int i,j=0,x,y,z,count=0;
	scanf("%s %s",a,b);
	for(i=250;i>=0;i--)
	{
		if(a[i]!='\0')
		{
			x=i;
			break;
		}
	}
	for(i=250;i>=0;i--)
	{
		if(b[i]!='\0')
		{
			y=i;
			break;
		}
	}
	z=max(x,y);
	for(i=x;i>=0;i--)
	{
		A[j]=trans(a[i]);
		j++;
	}
	j=0;
	for(i=y;i>=0;i--)
	{
		B[j]=trans(b[i]);
		j++;
	}
	for(i=0;i<=z;i++)
	{
		C[i]+=A[i]+B[i];
		if(C[i]>=10)
		{
			C[i]=C[i]-10;
		    C[i+1]+=1;
		}
	}
	for(i=0;i<=z+1;i++)
	{
		if(C[i]!=0)
		{
			count++;
			break;
		}
	}
	if(count==1)	
		for(i=z+1;i>=0;i--)
	{
		if(C[i]!=0)
		{
			for(j=i;j>=0;j--)
		    printf("%d",C[j]);
			break;
		}
	}
	else
		printf("0");
	return 0;
}
//?????0???
void cutzeros(char* a)
{
	int i;
	int unzero=0;
	int l=strlen(a);
	for(i=l-1;i>=0;i--)
	{
		if(a[i]!='0')    //???????
		{
		//	printf("%d %d\n",i,a[i]);  //debug
			a[i+1]='\0';
			unzero=1;
			break;
		}
	}
	if(unzero==0)   //??????
	{
		a[0]='0';
		a[1]='\0';
	}
}
//??????
void reorder(char*a)
{
	int i;
	char c;
	int l=strlen(a);
	for(i=0;i<l/2;i++)
	{
		c=a[i];
		a[i]=a[l-1-i];
		a[l-1-i]=c;
	}
}
//????????
char result[300];
void plus(char*a,char*b)
{
	int i;
	int la=strlen(a);
	int lb=strlen(b);
	int l;
	int r,left=0;
	if(la<=lb)
	{
		l=lb;
		for(i=la;i<=lb;i++)
			a[i]='0';
		b[lb]='0';
	}
	else
	{
		l=la;
		for(i=lb;i<=la;i++)
			b[i]='0';
		a[la]='0';
	}
	for(i=0;i<=l;i++)
	{
		r=(a[i]-'0')+(b[i]-'0')+left;
		result[i]=r%10+'0';
		left=r/10;   //??
	}
	result[l+1]='\0';   //????
}
int main()
{
	char a[260];
	char b[260];
	scanf("%s%s",a,b);
	reorder(a);
	reorder(b);
	plus(a,b);
	cutzeros(result);
	reorder(result);
	printf("%s",result);
	return 0;
}
char num1[MAX_LENGTH+10];
char num2[MAX_LENGTH+10];
int an1[MAX_LENGTH+10] = {0};
int an2[MAX_LENGTH+10] = {0};
int main(){
 int i, j;
 scanf("%s",num1);
 scanf("%s",num2);
 
 memset(an1, 0, sizeof(an1));
 memset(an2, 0, sizeof(an2));
 
 //?num1???????????????an1??
 int length1 = strlen(num1);
 int length2 = strlen(num2);
 j = 0;
 for(i = length1-1;i >= 0; i--){
    an1[j++] = num1[i] - '0';
 }
 j=0;
 for(i = length2-1;i >= 0; i--){
    an2[j++] = num2[i] - '0';
 }
 
 //????
 for(i = 0;i < MAX_LENGTH; i++){
    an1[i] += an2[i];
    if(an1[i] >= 10){
     an1[i] -= 10;
     an1[i + 1]++;
    }
 }
 
 int flagStart  = FALSE;
 for(i = MAX_LENGTH;i >= 0; i--){
    if(flagStart)
     printf("%d",an1[i]);
    else if(an1[i]){
     printf("%d",an1[i]);
     flagStart = TRUE;
    }
 }
 //????0?????0
 if(flagStart ==  FALSE)
     printf("0\n");
 
 //??
 
 return 0;
}
int main(){
    char aa[300],bb[300],cc[300];
    gets(aa);
    gets(bb);
    int i,j,k,l,x,g;
    i=0;
    j=0;
    while(aa[i]!='\0')
    i++;
    while(bb[j]!='\0')
    j++;
    if(i<j)
    k=j;
    else k=i;
    g=0;
    for(l=0;l<=k;l++){
     x=0;
     if(i>l&&j>l)
      x=(int)(aa[i-l-1]+bb[j-l-1]-96);
     else{
          if(i>l)
          x=aa[i-l-1]-48;
          if(j>l) 
          x=bb[j-l-1]-48;
          }
      x=x+g;
      if(x>9){
      x=x-10;
      g=1;
      }
      else g=0;
      cc[k-l]=x+48;
      }
      j=0;
      while(aa[j]==48)
      j++;
      if(j==k)
      cout<<0;
      else{
      if(cc[j]==48)
       j++;
      for(i=j;i<=k;i++)
      cout<<cc[i];
      }     
    
 
    return 0;
}
/***********************************************************************
     
     ??:?????
     ??: ???????? 
     ??:
         ?1????????????????????????????????????????????????????
         ?2???????????????????????????????????????
         ?3??????????????????? 
         ?3?????????? 
     ????? 2012.03.09    ??? 
     ***********************************************************************/


struct stu
{
  int num;
    struct stu *next;   
};
main()
{
    int i,j,n,y,q,m,t;
    n=1000;   // ??printf("?????????????????\n");  scanf("%d ",&n)
   // printf("????????????????\n");
    struct stu *head,*p,*p1,*p2;     //???P1????? 
    struct stu *head0,*p0,*p3,*p4;   //???P2????? 
    struct stu *p5,*p6,*p7,*p8;      //???P5????? 
    char a[n],b[n];
     
    gets(a);
    i=strlen(a);
    gets(b);
    j=strlen(b);
      //i?j??????? a?b??? 
    if(i>j){t=i;}       
    else {t=j;}      
   // ??????????????+1??????????e[t]???   ??????a?b???? 
    t=t+1;
    int e[t];
    
    p1=p2=(struct stu*)malloc(LEN); //????p1??? ?p2????? 
    p1->num=a[i-1]-'0';
    head=p1;
    p3=p4=(struct stu*)malloc(LEN); //????p3??? ?p4????? 
    p3->num=b[j-1]-'0';
    head0=p3; 
    i=i-1;j=j-1;         //?while???? 
    p=head;            //????P?P0. 
    p0=head0; 
    
    //????????P5   
    int  c1=0,c2;       //C2????????C1??C2???C1???0     
    c2=p->num+p0->num;
    p5=p6=(struct stu*)malloc(LEN);//?????? 
     y=c2+c1/10;      //Y??????? 
    p5->num=y%10;    //???????????P5??? 
    c1=c2; 
    p7=p5; 
    
     while(i>0||j>0)     //????????????? 
    {    
        p2=p1;
        p1=(struct stu*)malloc(LEN);
        p1->num=(i>0)?a[--i]-'0':0;      //??????0 
        p2->next=p1;
        
        p4=p3;
        p3=(struct stu*)malloc(LEN);
        p3->num=(j>0)?b[--j]-'0':0;        //??????0      
        p4->next=p3;
         
        p0=p0->next; 
        p=p->next; 
      
        c2=p->num+p0->num; 
        
        p6=p5;
        p5=(struct stu*)malloc(LEN);
        y=c2+y/10;                   //Y??????? 
        p5->num=y%10;    //???????????P5??? 
        c1=c2;
        p6->next=p5;
    }
     p1->next=NULL;          
     p3->next=NULL;
     p6=p5;
     p5=(struct stu*)malloc(LEN);
     p5->num=y/10;        //???????  
     p6->next=p5;            
     p5->next=NULL; 
     
     
      //?????????  
     p=head;
     p0=head0;
     p8=p7;
    for(m=t-1;p8!=NULL;m--)
    {
     e[m]=p8->num;
      p8=p8->next;
    }
   
    m=0;
    if(p5->num==0&&t==2)   //?????????0? 
    {m=1;}                 //?????0 
    else                   //?????????????0?
    {
     while(e[m]==0&&m<t)    //???????0   
    {m++;}
    }
    for(y=m;y<t;y++)        //????
    {
      printf("%d",e[y]);              
    } 
    struct stu *pt;
      while(p!=NULL)
    {
      pt=p;
      p=p->next; 
      free(pt);                    
    }
     while(p8!=NULL)
    {
      pt=p8;
      p8=p8->next; 
      free(pt);    
    }
     while(p0!=NULL)
    {
      pt=p0;
      p0=p0->next; 
      free(pt);     
    }      
getchar();
getchar();
getchar(); 
}