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

谁能帮帮忙,我都急疯了,输出的和例子一样

Posted by zhouwenn at 2005-05-12 20:20:39 on Problem 2105
#include<stdio.h>
#include<string.h>
int fab(int a,int b,int c,int d,int e,int f,int g,int h){
return(128*a+64*b+32*c+16*d+8*e+4*f+g*2+h);
}
void main()
{char a[32],k;
 int b[32],c,i,n;
 scanf("%d",&n);    k=getchar();
 while(n--)
 {     gets(a);
	 for(i=0;i<32;i++)
  {b[i]=a[i]-'0';}
	 for(i=0;i<4;i++)
	{c=fab(b[8*i],b[8*i+1],b[8*i+2],b[8*i+3],b[8*i+4],b[8*i+5],b[8*i+6],b[8*i+7]);
	 if(i<3) printf("%d.",c);
	 else printf("%d",c);
        }
  printf("\n");
 }
}


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