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 goldenlock at 2005-02-04 23:14:46 on Problem 1006
In Reply To:到底题目还有什么玄机,怎么总是wrong answer,测试数据太少了,看不出来啊,有高手指点一下吗? Posted by:00348264 at 2004-10-13 21:18:53
> #include<iostream.h>
> void main()
> {
> 	long a,b,c,d,t;
> 	for(int i=1;;i++)
> 	{
> 		cin>>a>>b>>c>>d;
> 		if(a==-1)
> 			break;
> 		t=d+33-(d-c)%33;
> 		while(1)
> 		{ 
> 			if((t-b)%28==0&&(t-a)%23==0)
> 			{
> 				cout<<"Case "<<i<<": the next triple peak occurs in "<<t-d<<" days."<<endl;
> 				break;
> 			}
> 			t+=33;
> 		}
> 	}
> }
> 			

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