-->
当前位置:首页 > 题库

PROGRAMMING:Kauraz conjecture (exercise 6-11, fundamentals and applications of Python programming, Higher Education Society)

Luz5年前 (2021-05-10)题库440
Collatz conjecture, also known as the odd and even normalization conjecture, refers to that for every positive integer, if it is odd, multiply it by 3 and then add 1, if it is even, divide it by 2.
In this way, we can get 1 in the end. Write a program, input a positive integer, print its koalas sequence.
###Input format:
1 positive integer > 1
###Output format:
A comma separated koalas sequence.
###Input example:
```in
five
```
###Output example:
```out
16,8,4,2,1
```







answer:If there is no answer, please comment