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…
解题报告:这题就用一个进制转换的函数就可以了,不需要转换成相应的进制数,只要求出相应进制的数的各位的和就可以了. #include<cstdio> #include<string> #include<cstring> #include<map> #include<iostream> using namespace std; int trans(int x,int r) { ; while(x) { sum += x%r; x/=r; } retu…
题目链接: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…
题意  给你两个二进制数m,n   求他们的最大公约数  用二进制表示  0<m,n<2^1000 先把二进制转换为十进制  求出最大公约数  再把结果转换为二进制  数比較大要用到大数 import java.util.*; import java.math.*; public class wl6_9 { static BigInteger two = BigInteger.valueOf(2), one = BigInteger.ONE, zero = BigInteger.ZERO; s…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=2031 进制转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 60988    Accepted Submission(s): 33224 Problem Description 输入一个十进制数N,将它转换成R进制数输出.   Input…
进制转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 63039    Accepted Submission(s): 34261 Problem Description 输入一个十进制数N,将它转换成R进制数输出.   Input 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=16, R<…
看了http://lovnet.iteye.com/blog/1690276的答案 好巧妙的方法 递归实现十进制向m进制转换 #include "stdio.h" int m; void CK(int n) { if(n>=m) CK(n/m); printf("%d",n%m); } int main() { int a,b; while(~scanf("%d",&m)&&m) { scanf("%d%d…
http://codeforces.com/problemset/problem/552/C C. Vanya and Scales time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya has a scales for weighing loads and weights of masses w0, w1, w2, ..…
进制转换,杭电0j-2031原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=2031 [Problem Description] 输入一个十进制数N,将它转换成R进制数输出. [Input] 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=16, R<>10). [Output] 为每个测试实例输出转换后的数,每个输出占一行.如果R大于10,则对应的数字规则参考16进制(比如,10用A表示,等等).…
一.背景 前段时间群里的朋友问了一个问题:“在查询时增加一个递增序列,如:0x00000001,即每一个都是36进位(0—9,A--Z),0x0000000Z后面将是0x00000010,生成一个像下面的映射表“: (Figure1:效果图) 二.十进制转换为十六进制 在网上有很多资料关于使用SQL语句把十进制转换为十六进制的资料,比如: --方式1 ), ) 执行返回值为0x00005CE9,但是需要注意的是,这本应该返回二进制的,但是二进制估计是阅读起来太麻烦,所以SQL Server 返回…