/* 大精度整数加减法 */ #include <cstdio> #include <iostream> #include <algorithm> using namespace std; struct BigN{ int d[1000]; int len; BigN(){ fill(d,d+1000,0); len = 0; } }; BigN change(string str){ BigN n; n.len = str.length(); for(int i=0; i<n.len; i++){ n.d[i] = str[str.length()-i-1]-'0'; } return n; } BigN add(BigN a,BigN b){ BigN c; int carry = 0; for(int i=0; i<a.len||i<b.len; i++){ int current = a.d[i] + b.d[i] + carry; c.d[c.len++] = current%10; carry = current/10; } if(carry!=0){ c.d[c.len++] = carry; } return c; } void Print(BigN a){ for(int i=a.len-1;i>=0;i--){ cout<<a.d[i]; } cout<<"\n"; } int main(){ string a,b; while(cin>>a>>b){ BigN A = change(a); BigN B = change(b); Print(add(A,B)); } return 0; }