进制转化
biongbiongdou
这个作者很懒,什么都没留下…
展开
-
【HDU】1335 Basically Speaking
问题描述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 ne...原创 2018-03-31 15:08:45 · 170 阅读 · 0 评论 -
【HDU】1390 Binary Numbers
Problem DescriptionGiven a positive integer n, find the positions of all 1's in its binary representation. The position of the least significant bit is 0.ExampleThe positions of 1's in the binary repr...原创 2018-04-01 11:52:27 · 414 阅读 · 0 评论 -
【HDU】1720 A+B Coming(十六进制)
Problem DescriptionMany classmates said to me that 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...原创 2018-04-09 18:21:52 · 297 阅读 · 0 评论 -
【HDU】 1877 又一版 A+B(进制转换)
Problem Description输入两个不超过整型定义的非负10进制整数A和B(<=231-1),输出A+B的m (1 < m <10)进制数。 Input输入格式:测试输入包含若干测试用例。每个测试用例占一行,给出m和A,B的值。当m为0时输入结束。 Output输出格式:每个测试用例的输出占一行,输出A+B的m进制数。 Sample Input8 1300 48 2 1...原创 2018-04-10 14:50:21 · 1441 阅读 · 0 评论 -
进制转换——十六进制与十进制
例1:十六进制转十进制问题描述:从键盘输入一个不超过8位的正的十六进制数字符串,将它转换为正的十进制数后输出。注:十六进制数中的10~15分别用大写的英文字母A、B、C、D、E、F表示。样例输入:FFFF样例输出:65535代码:// main.cpp // 进制转换(16-10) // // Created by showlo on 2018/4/10. // Copyright © 2...原创 2018-04-10 18:09:16 · 338 阅读 · 0 评论