标签:scan n+1 main ret color int std stdio.h return
#include<stdio.h> int main() { int n,sum; while(scanf("%d",&n)!=EOF){ sum=0; while(n!=1){ if(n%2==0) n=n/2; else n=3*n+1; sum+=1; } printf("%d\n",sum); } return 0; }
标签:scan n+1 main ret color int std stdio.h return
原文地址:https://www.cnblogs.com/Estwind/p/9903180.html