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

为什么WA!?

Posted by dingdongsheng at 2008-09-21 00:19:55 on Problem 1552
#include<stdio.h>
void main()
{
	int a[16];
	int i,j,count=0,k;
	while(scanf("%d",&a[0]),a[0]!=-1)
	{
		i=1;
		while(scanf("%d",&a[i]),a[i])
			i++;
		for(j=0;j<i-1;j++)
			for(k=1;k<i;k++)
				if(a[j]*2==a[k])
					++count;
				printf("%d\n",count);
				count=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