题解 1095: The 3n + 1 problem

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

筛选

随缘fdfdfdfdfdf

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {……

The 3n+1 problem

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>using namespace std;long long len(long long n)……

纯纯小白做题家-直接上代码

摘要:解题思路://数组最大值问题(此问题中可以不用数组,只比较众多数地大小,取最大值),EOF问题//值得注意的是,输入的数据大小顺序不是一定的,并且对输出顺序没有要求,也就是说要按原输入顺序输出,但是在……

The 3n + 1 problem

摘要:解题思路:注意事项:参考代码:def f(x):    c=1    while x!=1:        if x%2==0:            x=x//2        else:     ……

The 3n + 1 problem

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int x,y,max,a,b,rest; while(~scanf("%d %d",&a,&b)) { ……

个人思路,随便看看吧

摘要:解题思路:学会列表的相关操作很重要注意事项:参考代码:def fun(n):    l1 = [n]    while n != 1:        if n % 2 == 0:           ……