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

哪里错了?thank you very much

Posted by 00108035 at 2004-05-18 12:53:28 on Problem 1006
#include <iostream.h>
void main()
{
	int a,b,c,d,t=0;
	while(1)
	{
		t++;
		cin>>a>>b>>c>>d;
		if(a<=-1&&b<=-1&&c<=-1&&d<=-1) return;
		for(int i=a; ;i+=23)
		{
			if(a==0&&b==0&&c==0) i=23*28*33;
			if((i-b)%28==0 && (i-c)%33==0) break;
		}
		cout<<"Case "<<t<<": the next triple peak occurs in "<<i-d<<" days."<<endl;
	}
}

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