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

Re:高手帮帮忙呀,怎么就wa了??????

Posted by 00430030 at 2005-01-11 16:44:50 on Problem 1552
In Reply To:高手帮帮忙呀,怎么就wa了?????? Posted by:00430030 at 2005-01-11 16:41:50
> #include<stdio.h>
> #include<math.h>
> void main()
> {
> 	int i,m,n,p=0,a[20];
> 	for(;;)
> 	{	for(i=0;;i++)
> 		{
> 			scanf("%d",&a[i]);
> 			if(a[i]==-1)  goto  end;
> 			else if(a[i]==0)goto loop;
> 		}
> loop:		for(m=0;m<i;m++)
> 			{for(n=0;n<i;n++)
> 			if(a[m]==2*a[n]) p++;}
> 				printf("%d\n",p);
> 	}
> end:;
> }

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