摘要: #include<stdio.h>int main(){int n,i;scanf("%d",&n);for(i=0;i<n;i++){ int day,x1,x2;scanf("%d",&day);{ x2=1;while(day){ x1=(x2+1)*2; x2=x1; day--;}printf("%d\n",x1);}}return 0;} 阅读全文
posted @ 2013-06-07 23:06 融雪残阳 阅读(2206) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { int i,n; scanf("%d",&n); for(i=0;i<n;i++) { int j=0,m,t; scanf("%d",&m); while(m) { t=m%2; if(t==0) m=m/2; else { j++; m=m>>1; } } printf("%d\n",j); } return 0; } 阅读全文
posted @ 2013-06-07 22:25 融雪残阳 阅读(564) 评论(0) 推荐(1) 编辑
摘要: #include<stdio.h>#include<string.h>int main(){int N,i,k;char str[40],ch;scanf("%d",&N);ch=getchar();while(N--){ gets(str); k=strlen(str); for(i=k-1;i>=0;i--) if(str[i]>='a'&&str[i]<='z') printf("%c",str[i]); printf("\n"); 阅读全文
posted @ 2013-06-07 13:32 融雪残阳 阅读(383) 评论(0) 推荐(0) 编辑