C. 角谷猜想

    Type: Default 1000ms 256MiB

角谷猜想

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

所谓角谷猜想,是指对于任意一个正整数,如果是奇数,则乘 3311,如果是偶数,则除以 22,得到的结果再按照上述规则重复处理,最终总能够得到 11

如,假定初始整数为 55,计算过程分别为 161688442211

程序要求输入一个整数,将经过处理得到 11 的过程输出来。

输入格式

一个正整数nnn2000000n \le 2000000)。

输出格式

从输入整数到 11 的步骤,每一步为一行,每一部中描述计算过程。最后一行输出End

如果输入为 11,直接输出End

样例 #1

样例输入 #1

5

样例输出 #1

5*3+1=16
16/2=8
8/2=4
4/2=2
2/2=1
End

循环结构小测(四)

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2025-7-8 9:00
End at
2025-8-7 9:00
Duration
1.5 hour(s)
Host
Partic.
25