1001 (3n+1)猜想 tanxiaofengsheng1s 2020-01-31 149 阅读1分钟 2020,1,30PAT刷题的开始。#include<iostream> using namespace std; int main(){ // cout<<"hello world"; int N;int count=0; cin>>N; while(N!=1){ if(N%2==1) N=(3*N+1)/2; else N=N/2; count++; } cout<<count; }