HDOJ 1390 Binary Numbers(进制问题)】的更多相关文章

Problem Description Given a positive integer n, find the positions of all 1's in its binary representation. The position of the least significant bit is 0. Example The positions of 1's in the binary representation of 13 are 0, 2, 3. Task Write a prog…
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 that it would be neato if this new calculator could c…
http://acm.hdu.edu.cn/showproblem.php?pid=1390 Binary Numbers Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2298    Accepted Submission(s): 1460 Problem Description Given a positive integer n…
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…
Weird Numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/129733#problem/F Description Binary numbers form the principal basis of computer science. Most of you have heard of other systems, such as ternary, octal, or hexadecimal. You probably know how…
本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/90678474 1100 Mars Numbers (20 分)   People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earth is called "jan, feb,…
The only difference between easy and hard versions is the maximum value of n. You are given a positive integer number nn. You really love good numbers so you want to find the smallest good number greater than or equal to n. The positive integer is ca…
进制转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30304    Accepted Submission(s): 16811 Problem Description 输入一个十进制数N,将它转换成R进制数输出.   Input 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=16, R<…
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…