PAT B1001害死人不偿命的(3n+1)猜想 #include <iostream> using namespace std; int main(void) { int n, step = 0; cin >> n; while(n != 1){ if ( n % 2 == 0 ){ n /= 2; } else { n = ( 3 * n + 1 ) / 2) } step++; } cout << step; }