Problem Description
Many classmates said to me that A+B is must needs.
If you can’t AC this problem, you would invite me for night meal. ^_^
Input
Input may contain multiple test cases. Each case contains A and B in oneline.
A, B are hexadecimal number.
Input terminates by EOF.
Output
Output A+B in decimal number in one line.
Sample Input
1 9
A B
a b
Sample Output
10
21
21
#include <iostream>
#include <iomanip>
int main(int argc, const char *argv[])
{
int nA, nB;
std::cin >> std::hex;
while(std::cin >> nA >> nB)
{
std::cout << nA + nB << std::endl;
}
return 0;
}