#include <iostream> #include <vector> using namespace std;
vector<int> add(vector<int> &A, vector<int> &B) { vector<int> C; int t = 0; for (int i = 0; i < A.size() i < B.size(); i++) { if (i < A.size()) t += A[i]; if (i < B.size()) t += B[i]; C.emplace_back(t % 10); t /= 10; } if (t) C.emplace_back(1); return C; }
int main() { string sa, sb; while (cin >> sa >> sb) { vector<int> a, b; for (int i = sa.size() - 1; i >= 0; i--) { a.push_back(sa[i] - '0'); } for (int i = sb.size() - 1; i >= 0; i--) { b.push_back(sb[i] - '0'); } vector<int> c = add(a, b); for (int i = c.size() - 1; i >= 0; i--) { cout << c[i]; } cout << '\n'; } return 0; }