| ||||||||||
| 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 | |||||||||
Re:errorIn Reply To:error Posted by:241 at 2009-07-13 11:44:41 > #include<stdio.h>
> #include<string.h>
>
> int main ()
> {
> int i,j,k,sum,t,n;
> char s[32];
> scanf("%d",&n);
> for(k=0;k<n;k++){
> getchar();
> gets(s);
> for(i=0;i<4;i++){
> t=128;sum=0;
> for(j=i*8;j<(i+1)*8;j++)
> {
>
> if(s[j]=='1') sum+=t;
> t/=2;
> }
> if(i==3) printf("%d\n",sum);
> else printf("%d.",sum);
>
> }
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator