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

觉得很简单。附代码(不需要用gets):

Posted by 0810311106 at 2009-09-12 11:04:07 on Problem 2105 and last updated at 2009-09-12 11:06:50
#include"stdio.h"
#include"string.h"
int main()
{
	int n;
	scanf("%d",&n);
	while(n--)
	{
		char a[33],temp[9];
		int i,j;
	        scanf("%s",&a);
	        j=0;
                for(i=0;i<strlen(a);i++)
                 {
        	    temp[j++]=a[i];
        	    if(j==8)
        	      {
        		 temp[j]='\0';
        		if(i!=strlen(a)-1)
        		   printf("%d.",strtol(temp,NULL,2));
        		else
        		   printf("%d\n",strtol(temp,NULL,2));
        		 j=0;
        	      }
                 }
	  
	}
	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