The 3n + 1 problem -题解(C语言代码) 摘要:#### 1095: The 3n + 1 problem [原题连接:The 3n +1 problem](https://www.dotcpp.com/oj/problem1000.html "…… 题解列表 2019年10月16日 0 点赞 0 评论 329 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码) 摘要:我是看了评论才注意到i,j输出的问题。但是我还有一个问题,输入1和1000000就得不到答案了,还想请教各位大佬。 ```c #include int fun(int m) { …… 题解列表 2019年10月28日 0 点赞 0 评论 309 浏览 评分:0.0
The 3n + 1 problem -题解(Java代码) 摘要:```java import java.util.Scanner; /** * The 3n + 1 problem * http://www.dotcpp.com/oj/probl…… 题解列表 2019年11月14日 0 点赞 0 评论 511 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码) 摘要:## 常规解法,只需要将数字转为Ascii码,A的为65. ```c #include int cmp(int n){ if (n==1){ printf("A"); }else…… 题解列表 2019年12月20日 0 点赞 0 评论 518 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码) 摘要:```c #include int main() { int n,m; int a,b; while(scanf("%d%d",&n,&m)!=EOF) // 题意是输入俩个…… 题解列表 2019年12月22日 0 点赞 0 评论 503 浏览 评分:0.0
The 3n + 1 problem -题解(C语言描述||显示33%错误原因之一) 摘要:```c #include #include int function(int n) { int sum=1; while(n!=1) { if(n%2==0) …… 题解列表 2020年01月31日 0 点赞 0 评论 326 浏览 评分:0.0
The 3n + 1 problem -题解(C++代码) 摘要:#思路 通过输入获得n1,n2;比较n1,n2的大小;使用for循环获得两数中循环次数的最大值,并输出。再将前面的放进循环中。 #心得 1.可以使用cin作为while的判断条件。例如:whil…… 题解列表 2020年02月02日 0 点赞 0 评论 392 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码) 摘要:#include int main() { int x,y,i,cl,tempt,maxCL;// "cl" is circle length while(scanf("…… 题解列表 2020年02月03日 0 点赞 0 评论 304 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码) 摘要: ```c #include #include int is(int n) { if(n==1) return 1; if(n%2) n=3*n+1; else n=n/2;…… 题解列表 2020年02月08日 0 点赞 0 评论 313 浏览 评分:0.0
The 3n + 1 problem -题解(Java代码) 摘要:## 刚开始没注意到一个坑,所以一直提示33%不通过; ` import java.util.Scanner; public class Main { …… 题解列表 2020年03月04日 0 点赞 0 评论 436 浏览 评分:0.0