#include <iostream> #include <iterator> #include <string> #include <algorithm> #include <climits> using namespace std; int rev(int x){ string s= to_string(x); reverse(s.begin(), s.end()); //判断是否溢出,溢出置0 int max = INT_MAX; string t1 = to_string(INT_MAX); if(s.size()==t1.size() && s>t1) return 0; return stoi(s); } int main() { int a, b; cin>>a; cin>>b; cout<<rev(rev(a)+rev(b)); return 0; }