#include <iostream> #include <string.h> #include <stdlib.h> using namespace std; int Rev_atoi(char* arg1,char* arg2) { char tmp1[16],tmp2[16]; int len1=strlen(arg1); int len2=strlen(arg2); memset(tmp1,0,16); memset(tmp2,0,16); if(len1>len2) for(int i=0;i<len1;i++) { tmp1[i]=arg1[len1-i-1]; if(i<len2) tmp2[i]=arg2[len2-i-1]; } else { for(int i=0;i<len2;i++) { tmp2[i]=arg2[len2-i-1]; if(i<len1) tmp1[i]=arg1[len1-i-1]; } } return (atoi(tmp1)+atoi(tmp2)); } void Rev_itoa(int in,char *out) { _itoa(in,out,10); } int main() { char a[16],b[16],c[32]; int iA=0; int iB=0; int iRevb=0; int iReva=0; cin>>a>>b; iRevb=Rev_atoi(a,b); Rev_itoa(iRevb,c); iReva=Rev_atoi(c,(char*)""); cout<<iReva<<endl; return 0; }