The 3n + 1 problem (C语言代码) 摘要:#include "stdafx.h" //不通过 参考int count = 0; int f(int n){ if (n == 1) { int k = count + 1;…… 题解列表 2018年10月31日 0 点赞 0 评论 714 浏览 评分:0.0
The 3n + 1 problem (C语言代码)韩哥哥的解法,有冒泡排序哦 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i,j,n,t,x,y,p,q,o,temp; int a[100]; while(~scanf("%…… 题解列表 2018年09月23日 0 点赞 0 评论 1151 浏览 评分:0.0
The 3n + 1 problem (C语言代码) 解题思路:求解每一个数的循环长度,然后再求最大值。注意事项:注意前面的大,后面的小时,要先交换两个数,但是也要注意先输出或保存交换前的两个数,因为是按输入顺序输出前面两个数的参考代码:#includeintmain(){inta, 题解列表 2018年09月08日 0 点赞 0 评论 1010 浏览 评分:0.0
此解可AC (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i, j, k, count = 1, max = 0, t; while (scanf("%d %d"…… 题解列表 2018年07月16日 1 点赞 0 评论 1263 浏览 评分:0.0
The 3n + 1 problem (C语言代码) 摘要:解题思路:注意事项:注意输入的i j的大小不一定谁大谁小,不要惯性思维先把i j输出了再说,因为题目要求输出顺序与输入相同注意max变量的复原参考代码:#include <stdio.h>#inclu…… 题解列表 2018年05月07日 0 点赞 0 评论 1047 浏览 评分:0.0
The 3n + 1 problem (C语言代码) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Demo { public static int print(int n) { …… 题解列表 2018年01月28日 0 点赞 0 评论 1029 浏览 评分:0.0
Manchester-The 3n + 1 problem 摘要:解题思路1.输入两个整数,a,b,然后输出这两个数,每个后面都要有一个空格符;(以文件结束符结束)2.如果a>b,交换这两个数;3.判断从a到b的每一个数 i(包括a,b),(1)如果i为奇数i=i*…… 题解列表 2017年12月18日 42 点赞 3 评论 1835 浏览 评分:8.4
WU-The 3n + 1 problem (C语言代码) 摘要:参考代码:#include<stdio.h> int fenjie(int a) { int i=0; while(a!=1) { if(a%2==0) { a=a/2;…… 题解列表 2017年12月17日 1 点赞 0 评论 1299 浏览 评分:0.0
The 3n + 1 problem (C语言代码) 摘要:#include <stdio.h> int main(void) { int i, j, k, max, n, len, t; while (scanf("%d%d", &i, &j) …… 题解列表 2017年12月16日 77 点赞 9 评论 1898 浏览 评分:9.0
我美吗! 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { long long int m,n,i,j,s,max,t; while(scanf("%…… 题解列表 2017年12月14日 0 点赞 0 评论 1574 浏览 评分:0.0