c++
#include <iostream>
using namespace std;
int a, b;
int rev(int x)
{
int y = 0;
for (; x; x /= 10) y = y * 10 + x % 10;
return y;
}
int main()
{
while (cin >> a >> b)
if (rev(a) + rev(b) == rev(a + b)) cout << a + b << endl;
else puts("NO");
return 0;
}
登录后发布评论
暂无评论,来抢沙发