摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1032View Code #include"iostream"using namespace std;int i,j,Max=0;int fun(int x,int y){ for(i=x; i<=y; i++) { int count=1; int xx=i; while(xx!=1) { if(xx%2!=0) xx=3*xx+1; else xx=xx/2; count++; } if(count>Max) Max=count; } return Max;}int mai 阅读全文
posted @ 2011-03-31 17:44 聊聊IT那些事 阅读(317) 评论(0) 推荐(0) 编辑