#include<iostream>
using namespace std;
int main()
{
int n, count = 0;
cin >> n;
while (n != 1)
{
if (n % 2 == 0)
{
n = n / 2;
}
else
{
n = 3 * n + 1;
n = n / 2;
}
count++;
}
cout << count << endl;
return 0;
}
1001. 害死人不偿命的(3n+1)猜想
最新推荐文章于 2024-08-02 09:49:39 发布