using System;
namespace PAT
{
class Program
{
static void Main(string[] args)
{
int num = Convert.ToInt32(Console.ReadLine());
int deep = 0;
while (num != 1)
{
if (num % 2 == 0)
{
num /= 2;
deep++;
}
else
{
num = (num * 3 + 1) / 2;
deep++;
}
}
Console.WriteLine(step);
}
}
}
PAT-B-1001-C#描述
猜你喜欢
转载自blog.csdn.net/m0_37302219/article/details/79463527
今日推荐
周排行