#include <iostream> #include <string> using namespace std; char data1[1001]; char data2[1001]; char sumData[1002]; void main(void) { while (cin >> data1 >> data2) { int len1 = strlen(data1); int len2 = strlen(data2); int i = len1 - 1, j = len2 - 1, k = 0; int tmp = 0;//进位 int sum = 0; while (i >= 0 && j >= 0) { sum = (data1[i] - '0') + (data2[j] - '0') + tmp; if (sum > 9) { sum %= 10; tmp = 1; } else tmp = 0; sumData[k++] = sum + '0'; i--; j--; } while (i >= 0) { sum = data1[i] - '0' + tmp; if (sum > 9) { sum %= 10; tmp = 1; } else tmp = 0; sumData[k++] = sum + '0'; i--; } while (j >= 0) { sum = data2[j] - '0' + tmp; if (sum > 9) { sum %= 10; tmp = 1; } else tmp = 0; sumData[k++] = sum + '0'; j--; } if (tmp == 1) sumData[k++] = tmp + '0'; for (int t = k - 1; t >= 0; t--) cout << sumData[t]; cout << endl; } }