文件名称:1
-
所属分类:
- 标签属性:
- 上传时间:2013-03-16
-
文件大小:2.65kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
The famous Collatz sequence is generated by a method decribed as follows. Given a positive integer N, if it is odd, then replace it with 3*N+1. For even number N, use N/2 instead. You can get a sequence of number by this method. It is conjectured that the algorithm above will terminate at 1 for any integral input value. Despite the simplicity of the algorithm, it is unknown whether this conjecture is true. It has been verified, however, for all integers n such that 0 < n < 1,000,000 (and, in fact, for many more numbers than this.)
-Input
The first line contains a single integer T tells that there are T cases in the problem. Then for each case, there is an integers N.
Output
For each number N, output the sequence generated in a line, using coma as its separator.
-Input
The first line contains a single integer T tells that there are T cases in the problem. Then for each case, there is an integers N.
Output
For each number N, output the sequence generated in a line, using coma as its separator.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1/
1/.classpath
1/.project
1/.settings/
1/.settings/org.eclipse.jdt.core.prefs
1/bin/
1/bin/Main.class
1/src/
1/src/Main.java
1/.classpath
1/.project
1/.settings/
1/.settings/org.eclipse.jdt.core.prefs
1/bin/
1/bin/Main.class
1/src/
1/src/Main.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.