#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定律 (水)
最新推荐文章于 2019-09-28 10:52:47 发布