标签:turn main scan n+1 return std int amp print
#include<stdio.h>
int main()
{
int a;
int b=0;
scanf("%d",&a);
while(a!=1)
{
if(a%2==1)
{
a=3*a+1;
}else
{
a=a/2;
}
b++;
}
printf("%d\n",b%3);
}
return 0;
}
标签:turn main scan n+1 return std int amp print
原文地址:https://www.cnblogs.com/lijianmin6/p/10185391.html