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

WA...谁能贴些BT的测试数据给我啊。感觉...为什么...唉...

Posted by IceAngel at 2005-05-14 10:29:10 on Problem 1006
#include "iostream.h"

int main()
{
	long p , e , i , d;
	long s;
	long caseCount = 0;

	cin >> p >> e >> i >> d;
	while( p>=0 || e>=0 || i>=0 || d>=0 )
	{
		caseCount++;
		s = i + 33;
		while( s < e || s < p || ( ( s - e ) % 28 != 0 ) || ( ( s - p ) % 23 != 0 ))
		{
			s += 33;
		}
		cout<<"Case "<<caseCount<<": the next triple peak occurs in "<<s-d<<" days."<<endl;

		cin >> p >> e >> i >> d;
	}

	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