1 #include2 #include 3 #include 4 using namespace std; 5 int main(){ 6 string str1; 7 string str2; 8 while(cin>>str1>>str2){ 9 int size1 = str1.size()-1;10 int size2 = str2.size()-1;11 int flag = 0;12 for(int i=0;i<=size1;i++){13 if(!(str1[i]>='0' && str1[i] <= '9')){14 cout<<"error"< ='0' && str2[i] <= '9')){22 cout<<"error"< =0 && size2>=0){32 int nsum = (str1[size1] - '0') + (str2[size2] - '0') + carry;33 carry = nsum/10;34 nsum = nsum%10;35 sum += to_string(nsum);36 size1--;37 size2--;38 }39 while(size1 >= 0){40 int nsum = (str1[size1] - '0') + carry;41 carry = nsum/10;42 nsum = nsum%10;43 sum += to_string(nsum);44 size1--;45 }46 while(size2 >= 0){47 int nsum = (str2[size2] - '0') + carry;48 carry = nsum/10;49 nsum = nsum%10;50 sum += to_string(nsum);51 size2--;52 }53 if(carry){54 sum += '1';55 }56 reverse(sum.begin(),sum.end());57 cout< <