Problem Description As one of the most powerful brushes, zhx submits a lot of code on many oj and most of them got AC. One day, zhx wants to count how many submissions he made on n ojs. He knows that on the ith oj, he made ai submissions. And what yo…
zhx's submissions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 540    Accepted Submission(s): 146 Problem Description As one of the most powerful brushes, zhx submits a lot of code on many o…
题目 参考自博客:http://blog.csdn.net/a601025382s/article/details/38517783 //string &replace(iterator first0, iterator last0,const_iterator first, const_iterator last); //把[first0,last0)之间的部分替换成[first,last)之间的字符串 /* 题意: 我们将3,4,5,6认为是幸运数字.给定一个十进制数n. 现在可以讲起任意转…
传送门: 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…
解题报告:这题就用一个进制转换的函数就可以了,不需要转换成相应的进制数,只要求出相应进制的数的各位的和就可以了. #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…
进制转换 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://www.iteye.com/topic/1133941 症状: 使用Eclipse win 64位版本,indigo及kepler都重现了,使用tomcat 6.0.39,jdk1.6.u45及1.7u45均尝试了,也重现. 重现步骤很简单,使用debug模式启动时较容易出来,debug启动tomcat,(我的是webapp)然后在页面上随便点点即发现eclipse僵死,且任何从浏览器发出的请求都卡住不能被接收执行. 1.然后从任务管理器直接杀掉eclipse对应的jav…
进制转换,杭电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表示,等等).…
16转10 用竖式计算: 16进制数的第0位的权值为16的0次方,第1位的权值为16的1次方,第2位的权值为16的2次方 第0位: 5 * 16^0 = 5 第1位: F * 16^1 = 240 第2位: A * 16^2= 2560 第3位: 2 * 16^3 = 8192 -代码 #include <iostream> #include <string> using namespace std; int main() { string s; while(cin>>…