文件名称:1
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-12-09
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- wi***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
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
.\.classpath
.\.project
.\.settings
.\.........\org.eclipse.jdt.core.prefs
.\bin
.\...\Main.class
.\src
.\...\Main.java