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:总是wrong answer!哪位大哥帮忙看一下。

Posted by 20061003965 at 2007-06-02 10:31:49 on Problem 1006
In Reply To:总是wrong answer!哪位大哥帮忙看一下。 Posted by:septemsure at 2005-04-22 15:20:51
> #include <iostream.h>
> void main()
> {
> 	int p,e,i,d,j,day,k=0;
> 	cin>>p>>e>>i>>d;	 
> 	while ( p!=-1 && e!=-1 && i!=-1 && d!=-1)
> 	{
> 		k++;
> 		for (j=1;j<=21252;j++)
> 		{
> 			if ( (j-p)%23==0 && (j-e)%28==0 && (j-i) % 33==0)
> 			{
> 				day=j-d;
> 				break;
> 			}		
> 		}		
> 		cout<<"Case "<<k<<": the next triple peak occurs in "<<day<<" days."<<endl;
> 		cin>>p>>e>>i>>d;
> 	}
> }
> 提交了2次,用题目给的标准输入测试,可以得到题目的标准输出。但提交后就是wrong answer!

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