题解 1095: The 3n + 1 problem

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

The 3n + 1 problem -题解(C语言代码)

摘要:我是看了评论才注意到i,j输出的问题。但是我还有一个问题,输入1和1000000就得不到答案了,还想请教各位大佬。 ```c #include int fun(int m) { ……

The 3n + 1 problem -题解(C++代码)

摘要:#思路 通过输入获得n1,n2;比较n1,n2的大小;使用for循环获得两数中循环次数的最大值,并输出。再将前面的放进循环中。 #心得 1.可以使用cin作为while的判断条件。例如:whil……