#include<cstdio>
#include<iostream>
using namespace std;
int main(){
int n;scanf("%d", &n);
int step=0;
while(n!=1){
step++;
if(n%2==0){
n=n/2;
}else{
n=3*n+1;
n=n/2;
}
}
cout<<step<<endl;
return 0;
}
1001 害死人不偿命的(3n+1)猜想
最新推荐文章于 2024-08-21 18:16:36 发布