已解决 许嘉耀 新手守护 题目链接: 酷町堂:3683 #include <iostream> using namespace std; int n; int sum; int main(){ cin>>n; while(n=1){ if(n%2==0){ n=n/2; sum++; }else{ n=(3*n+1)/2; sum++; } } cout<<sum; return 0; }