#include <stdio.h> int main(){ int n; int count=0; if (scanf("%d",&n)!=EOF){ while (n!=1){ if (n%2==0){n=n/2;} else{n=3*n+1;} count++; } printf("%d",count); } else{ printf("input wrong"); } return 0; }
#include <stdio.h> int main(){ int n; int count=0; if (scanf("%d",&n)!=EOF){ while (n!=1){ if (n%2==0){n=n/2;} else{n=3*n+1;} count++; } printf("%d",count); } else{ printf("input wrong"); } return 0; }
天 : 20052
小时 : 467879
分钟 : 28072765
秒 : 1684365900