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 boygod at 2006-01-30 01:45:06 on Problem 1552
#include <stdio.h>
int main()
{
 int a[16],i,j,k,p,n;

 while (1)
   {
	 n=0;
     for (i=1;i<16;i++)
       {
        scanf ("%d",&a[i]);
		if (a[1]==-1)
          {
			exit (1);
          }
        else if (a[i]==0)
          {
            k=i;
            break;
          }
      }
	 for (i=1;i<k;i++)
       {
         p=2*a[i];
	  for (j=1;j<k;j++)
         if (p==a[j])
			{
			 n++;
			 continue;
			 }
       }
      printf ("%d\n",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