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:为什么错呀 牛人们帮帮我呀 我快不行了

Posted by dog0883 at 2008-12-16 22:28:21 on Problem 3427
In Reply To:为什么错呀 牛人们帮帮我呀 我快不行了 Posted by:wangfengtian at 2008-12-07 19:03:35
“Sample Output”字样是不用输出的

> #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