Problem4529--角谷猜想

4529: 角谷猜想

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

角谷猜想的内容如下:给定一个整数 lns="http://www.w3.org/1998/Math/MathML">n

  • 若 lns="http://www.w3.org/1998/Math/MathML">n 是偶数,将 lns="http://www.w3.org/1998/Math/MathML">n 减少一半;
  • 若 lns="http://www.w3.org/1998/Math/MathML">n 是奇数,将 lns="http://www.w3.org/1998/Math/MathML">n 的值乘 lns="http://www.w3.org/1998/Math/MathML">3,再加 lns="http://www.w3.org/1998/Math/MathML">1

不断地重复这个操作,任何正整数都会变成 lns="http://www.w3.org/1998/Math/MathML">1

这个猜想很可能是正确的,因为借助计算机,尚未发现存在反例。

给定 lns="http://www.w3.org/1998/Math/MathML">n,请输出把 lns="http://www.w3.org/1998/Math/MathML">n 变成 lns="http://www.w3.org/1998/Math/MathML">1 的过程。

Input

  • 单个整数:表示 lns="http://www.w3.org/1998/Math/MathML">n
2≤n≤50000




Output

  • 若干整数,表示将 lns="http://www.w3.org/1998/Math/MathML">n 变成 lns="http://www.w3.org/1998/Math/MathML">1 的过程。

Sample Input Copy

13

Sample Output Copy

40 20 10 5 16 8 4 2 1

Source/Category