ac

许熠谦  •  19天前


include<stdio.h>

int main(){

int n;
scanf("%d",&n);
while(n!=1){
	if(n%2)
        n=n*3+1;
    else
        n/=2;
    printf("%d ",n);
}

}


Comments:

请先登录,才能进行评论