C语言训练-记录一下 摘要:```c #include void count(int *n) { if(*n%2==0){ printf("%d/2=%d\n",*n,*n/2); …… 题解列表 2020年04月21日 0 点赞 0 评论 430 浏览 评分:8.0
1147: C语言训练-角谷猜想 摘要:解题思路:不为1持续循环注意事项:参考代码:n = int(input())while n != 1: if n % 2 == 0: print("%d/2=%d" %(n,n /…… 题解列表 2024年01月13日 0 点赞 0 评论 168 浏览 评分:8.0
角谷猜想 c++ 摘要:解题思路:先写偶数,再写奇数,中间用else(个人想法)注意事项:不要用break,是偶数/2,不是偶数*3+1参考代码:#include<bits/stdc++.h>using namespace …… 题解列表 2022年03月26日 0 点赞 0 评论 1072 浏览 评分:8.3
C语言训练-角谷猜想 (C++代码)(3N+1问题) 摘要:解题思路:3N+1问题只是需要输出过程而已。。注意事项:炉石传说真尼玛好玩!!!参考代码:#include<iostream> using namespace std; int main(…… 题解列表 2017年08月24日 3 点赞 0 评论 1993 浏览 评分:8.3
C语言训练-角谷猜想 (C语言代码) 摘要:#include<stdio.h>int main(){ int n,m=0; scanf("%d",&n); for(;m!=1;) { if(n%2==0) { m=n/2; …… 题解列表 2019年02月15日 0 点赞 0 评论 1202 浏览 评分:8.8
优质题解 Manchester- C语言训练-角谷猜想 摘要:解题思路:输入一个数N;N为偶数,输出N/2=,然后N/=2,判读N是否等于1,等于跳出循环;N为奇数,输出N*3+1=,然后N=N*3+1,判读N是否等于1,等于跳出循环;注意事项:输入N=1时,循…… 题解列表 2017年12月21日 15 点赞 8 评论 3287 浏览 评分:9.1
。。。。。。。。。。。。。。 摘要:解题思路:无注意事项:无参考代码:num=int(input()) while num!=1: if num%2==0: print(str(num)+'/2&#…… 题解列表 2023年03月21日 0 点赞 0 评论 262 浏览 评分:9.9
C语言训练-角谷猜想 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,tem; scanf("%d",&n); tem=n; while(tem!…… 题解列表 2017年08月31日 0 点赞 0 评论 1873 浏览 评分:9.9
C语言训练-角谷猜想-题解(C语言代码) 摘要:解题思路:while函数和if else的使用,while(当number等于0时结束),if(如果number是偶数执行),else(number是奇数时执行).注意事项:注意加上{}符号,&符号,…… 题解列表 2020年11月09日 0 点赞 0 评论 735 浏览 评分:9.9
Hifipsysta-1147题-C语言训练-角谷猜想(C++代码)普通递归法 摘要:```cpp #include using namespace std; int func(int n){ int result; if(n%2==0){ …… 题解列表 2022年01月31日 0 点赞 0 评论 207 浏览 评分:9.9