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 Allan at 2006-07-25 00:17:40 on Problem 2000
#include <stdio.h>

int label[10004],k;

int main(void)
{
	int i,j;
	
	j=0;
	while(++k)
	{
		i=k;
		while(i--)
		{
			if(j>10003)break;
			label[++j]=label[j-1]+k;
	    }
	    if(i>-1)break;
	}
	while(1)
	{
		scanf("%d",&k);
		if(0==k)break;
		printf("%d %d\n",k,label[k]);
	}
	
	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