Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
水过贴代码。。1AC。。前进前进。。。任重而道远#include<stdio.h> #include<math.h> int main() { int n,sum,i,k; char number[40]; scanf("%d",&n); getchar(); while(n--) { gets(number); for(i=0,sum=0,k=7;i<=31;i++,k==0?(k=7,printf("%d",sum),sum=0,i<31?printf("."):printf("\n")):k--) sum=sum+(number[i]-'0')*pow(2,k); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator