20221124The 3n + 1 problem 摘要:解题思路:注意事项:输入&a,&b不确定其大小参考代码:#include <stdio.h>long len(long n){ long c=1; while(n!=1) { if (n%2==0…… 题解列表 2022年11月24日 0 点赞 0 评论 172 浏览 评分:0.0
The 3n + 1 problem(乐,别忘了i和j的值要比下大小,再使用,还有如果i如果大于j的话,你交换了他们的值,但最终结果输出i和j必须是输入的i和j) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,b; while(~scanf("%d%d",&a,&b)) { i…… 题解列表 2023年10月04日 0 点赞 0 评论 114 浏览 评分:0.0
题解 1095: The 3n + 1 problem 摘要:解题思路:注意事项:还得先比较输入的两个数的大小!!!参考代码#include<stdio.h> int main() { int a,b,m,n,j,temp; int su…… 题解列表 2023年04月03日 0 点赞 0 评论 113 浏览 评分: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语言代码) 摘要:#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 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int fun(int n){ int k=1; if(n==1) { return k; } while(n!=1) {…… 题解列表 2017年07月26日 0 点赞 0 评论 977 浏览 评分:0.0
The 3n + 1 problem -题解(C语言代码)输入一次数据就输出一次结果(有错误解析) 摘要:题目: 输入两个数i与j,计算i~j区间中每个数的循环次数 即当i…… 题解列表 2020年03月10日 0 点赞 0 评论 321 浏览 评分:0.0