123456789101112131415161718 |
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string stringA, stringB;
- while (cin >> stringA >> stringB){
- char *charA, *charB;
- charA = (char *) stringA.data();
- charB = (char *) stringB.data();
- int a, b;
- sscanf(charA, "%x", &a);
- sscanf(charB, "%x", &b);
- cout << a + b << endl;
- }
- }
|