Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

水过贴代码。。1AC。。前进前进。。。任重而道远

Posted by hch545767949 at 2013-02-11 23:02:40 on Problem 2105
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator