HDOJ 2057A + B Again 16진수 문제
16진수 입력과 출력.
코드는 다음과 같습니다.
#include
제목:
A + B Again
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 20656 Accepted Submission(s): 8896
Problem Description
There must be many A + B problems in our HDOJ , now a new one is coming.
Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too.
Easy ? AC it !
Input
The input contains several test cases, please process to the end of the file.
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.
Output
For each test case,print the sum of A and B in hexadecimal in one line.
Sample Input
+A -A
+1A 12
1A -9
-1A -12
1A -AA
Sample Output
0
2C
11
-2C
-90
+A -A
+1A 12
1A -9
-1A -12
1A -AA
0
2C
11
-2C
-90
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[항주전기oj] 2047 - 소의 EOF 쇠고기 꼬치(귀속)제목 링크: 클릭하여 보기 이것은 전형적인 귀속 문제이다. 귀속은 하나의 대형 복잡한 문제를 층층이 원래의 문제와 비슷한 규모가 비교적 작은 문제로 바꾸어 해답을 구하는 것이다. 귀속 전략은 소량의 프로그램만 있으면...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.