#include <string> #include <iostream> using namespace std; string Reverse(int n) {//将数字传入反转成字符串返回 string str = to_string(n); string str1; for (int i = str.size() - 1, j = 0; i >= 0 ; --i) { str1[j++] = str[i]; } return str1; } int main() { int a, b; while (cin >> a >> b) { //字符串转换成int型 int ra = stoi(Reverse(a)); int rb = stoi(Reverse(b)); int rab = stoi(Reverse(a + b)); if (ra + rb == rab) { cout << a + b << endl; } else { cout << "NO" << endl; } } }