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 wangfengtian at 2008-12-07 19:03:35 on Problem 3427
#include<stdio.h>
void main()
{
	int n,i,j,c,b[1000],l,k,d[1000];
	char a[20],t[20];
		
	i=0;
	while(scanf("%s%s%d",a,t,&k)!=EOF)
	{
		scanf("%d%d",&n,&l);
		for(d[i]=0,j=0;j<n;j++)
		{
			
			scanf("%d",&b[j]);
			if(b[j]%l!=0)
				c=l-b[j]%l;
			else 
				c=0;
			if(c>d[i])
				d[i]=c;
		}
		i++;
	}
	for(j=0;j<i;j++)
	{
		printf("Sample Output %d\n",j+1);
		printf("%d\n",d[j]);
	}
}

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