摘要: //1#include<stdio.h>int main(){ int n; scanf("%d",&n); int s[4]={0},t=0; while(n){ s[t++]=n%10; n/=10; } while(s[2]){ printf("B"); s[2]--; } while(s[1 阅读全文
posted @ 2019-02-17 19:10 捕鱼儿海 阅读(95) 评论(1) 推荐(0) 编辑
摘要: 1#include<stdio.h>int main(){ int n,t=0; scanf("%d",&n); while(n!=1){ if(n%2==0){ n=n/2; t++; }else{ n=(3*n+1)/2; t++; } } printf("%d\n",t); return 0; 阅读全文
posted @ 2019-02-17 14:34 捕鱼儿海 阅读(78) 评论(0) 推荐(0) 编辑