题解 1095: The 3n + 1 problem

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

筛选

The 3n + 1 problem (C++代码)

摘要:解题思路:将每一个区间内的数进行运算,找出其中循环次数最多的那一个注意事项:/*1 41 4 84 14 1 85 15 1 86 16 1 9 7 17 1 17*/先后输入的俩个数需要比大小让小的……

The 3n + 1 problem (C++代码)

摘要:解题思路:注意事项: 输入的i不一定比j小参考代码:#include<iostream>using namespace std;int main(){ int i,j; while(cin>>i>>j……

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

摘要:解题思路:注意事项:相信很多人踩雷在了  当输入的n>m的情况上了参考代码:#include <stdio.h>#include <string.h>int main(){    int n,m,i,……

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

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