Input may contain multiple test cases. Each case contains A and B in one line.
A, B are hexadecimal number.
A, B are hexadecimal number.
Input terminates by EOF
Output A+B in decimal number in one line;
input
1 9 A B a boutput
10 21 21代码如下
#include<stdio.h>
int main(void) {
int a,b;
while(scanf("%x %x",&a,&b) != EOF) {
printf("%d\n",a+b);
}
return 0;
}