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

贴出来,我放弃了,在下面怎么测试怎么过,一上去就AC。哪位仁兄给一组测试数据啊?谢了。

Posted by lhmm945 at 2006-01-21 23:43:01 on Problem 1006
#include<iostream>
using namespace std;

int main(void)
{
	int p=0,e,i,d,t=1,res;
	cin>>p>>e>>i>>d;
	while(p!=-1)
	{
		if(p==e&&e==i&&p<=d)
			res=p+21252;
		else
		{
			if(e>28)
				res=e;
			else
				res=e+28;
			while((res-p)%23!=0)
				res+=28;
			while((res-i)%33!=0)
				res+=644;
		}
		res-=d;
		if(res>21252)
			res-=21252;
                cout<<"Case "<<t++;
		cout<<": the next triple peak occurs in ";
		cout<<res<<" days."<<endl;
		cin>>p>>e>>i>>d;
	}
	system("pause");
	return 0;
}

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