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:结果完全正确,可为什么不能AC呢?大家帮帮忙,看一下

Posted by slj1990 at 2009-07-17 13:55:04 on Problem 1006
In Reply To:结果完全正确,可为什么不能AC呢?大家帮帮忙,看一下 Posted by:390738878 at 2009-07-17 10:59:12
> #include <stdio.h>
> void main()
> {
> 	int n,a,b,c,j;
> 	int p,e,i,d;
> 	for (j=1;;j++)
> 	{
> 		scanf("%d%d%d%d",&p,&e,&i,&d);
> 		if (p==-1 && e==-1 && i==-1 && d==-1)
> 			break;
> 		for(n=21252;;n--)
> 		{ 
> 			a=(n-p)%23;
> 			b=(n-e)%28;
> 			c=(n-i)%33;
> 			if(a==0 && b==0 && c==0)
> 			{ 
> 				printf("Case %d: the next triple peak occurs in %d days.\n",j,n-d);
> 				break;
> 			} 
> 		}
> 	}
> }

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