A+B Coming

来源:互联网 发布:q版形象设计软件 编辑:程序博客网 时间:2024/06/05 03:56

A+B Coming

Time Limit : 1000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 32   Accepted Submission(s) : 14

Font: Times New Roman | Verdana | Georgia

Font Size:  

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 one line.
A, B are hexadecimal number.
Input terminates by EOF.

Output

Output A+B in decimal number in one line.

Sample Input

1 9A Ba b

Sample Output

102121

Author

威士忌

这道题本身是很简单的,但是涉及到16进制数可能会小小的纠结一下、、至于到底要不要去讨论神马1到9,ABC的东西显然是不必要的、、
#include "<stdio.h>int main(){    int a,b;    while(scanf("%x %x",&a,&b)!=EOF)    {        printf("%d\n",a+b);    }    return 0;}

%x解决问题、