A+b Coming

Source: Internet
Author: User

A+b Coming
Time limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 5006 Accepted Submission (s): 2260
Problem Description Many classmates said to me, a+b is must needs.
If you can ' t AC this problem, you would invite me for night meal. ^_^
Inputinput may contain multiple test cases. Each case contains A and B on one line.
A, B is hexadecimal number.
Input terminates by EOF.
Outputoutput a+b in decimal number on one line.
Sample Input
1 9A Ba b
Sample Output
102121

Idea: I have no words in this question, do not convert can%x hex%o octal

1#include <stdio.h>2 intMainintargcChar*argv[])3 {4     intb;5      while(SCANF ("%x%x", &a,&b)! =EOF)6     {7printf"%d\n", A +b);8 9     }Ten     return 0; One}
View Code

A+b Coming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.