#include<stdio.h>
int main()
{
int n,count;
while(scanf("%d",&n)!=EOF&&n!=0)
{
count=0;
while(n>1)
{
if(n%2==0) n/=2;
else n=(3*n+1)/2;
count++;
}
printf("%d\n",count);
}
return 0;
}
hdu 3782 xxx定律 (水)
最新推荐文章于 2018-03-24 22:49:37 发布