Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too.
Easy ? AC it !
Each case consists of two hexadecimal integers A and B in a line seperated by a blank.
The length of A and B is less than 15.
#include<stdio.h>
int main()
{
int a,b,res;
while(~scanf("%llX %llX",&a,&b))
{
if(a+b>=0)
printf("%llX\n",a+b);//如果是小寫的x的話,也會wa
else
printf("-%llX\n",-a-b);
}
return 0;
}