#include <iostream> #include <stdio.h> using namespace std; //A 十六进制A+B转10进制 int main() { int a, b; while (cin >> hex >> a >> hex >> b) cout << a + b << endl; return 0; }