HDOJ(HDU) 1720 A+B Coming(进制)】的更多相关文章

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 num…
Faulty Odometer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4278 Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1335 Problem Description The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculator. As a computer scientist you suggested to the company t…
传送门: Sky数 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28761    Accepted Submission(s): 16168 Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+…
Lovekey Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10680    Accepted Submission(s): 3470 Problem Description XYZ-26进制数是一个每位都是大写字母的数字. A.B.C.….X.Y.Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规…
Sky数 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23808    Accepted Submission(s): 13510 Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,…
十进制转八进制的变形: #include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF&&n) { ; int m=n; ,x; while(n) { x=n%; )x--; )x--; sum+=ret*x; ret*=; n/=; } printf("%d: %d\n",m,sum); } ; }…
Problem Description As we know , we always use the decimal system in our common life, even using the computer. If we want to calculate the value that 3 plus 9, we just import 3 and 9.after calculation of computer, we will get the result of 12. But af…
Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表示1894,其四位数字之和也为22,啊哈,真是巧啊.Sky非常喜欢这种四位数,由于他的发现,所以这里我们命名其为Sky数.但是要判断这样的数还是有点麻烦啊,那么现在请你帮忙来判断任何一个十进制的四位数,是不是Sky数吧. Inpu…
Problem Description 输入两个不超过整型定义的非负10进制整数A和B(<=231-1),输出A+B的m (1 < m <10)进制数. Input 输入格式:测试输入包含若干测试用例.每个测试用例占一行,给出m和A,B的值. 当m为0时输入结束. Output 输出格式:每个测试用例的输出占一行,输出A+B的m进制数. Sample Input 8 1300 48 2 1 7 0 Sample Output 2504 1000 java强大的Integer.toStri…