题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2057 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 #include <cstdio> #include <iostream> #i…
PS:一开始我画蛇添足的用字符串来做....超麻烦...贴个我做的.. 代码: #include "stdio.h" #include "string.h" #include "math.h" long long cal(char a[]); long long back(long long a,char b[],long long &flag); char c[16]={'0','1','2','3','4','5','6','7'…
King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember history, King plans to play losephus problem in the parade gap.He calls n(1≤n≤5000) soldiers, counterclockwise in a circle, in label 1,2,3...n. The firs…