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

为什么一直出错啊?我在本地测试全部通过啊!郁闷 ing!!

Posted by cugwei at 2004-04-24 15:35:09 on Problem 1006
#include<iostream.h>
void main()
{
	int p,e,i,d;
	int cw,f=1;
	cin>>p>>e>>i>>d;
	while(p!=-1||i!=-1||e!=-1||d!=-1)
	{
	    if(p==0&&i==0&&e==0&&d==0) cw=33;
		else if((d-i)%33==0) cw=d;
		     else cw=((d-i)/33+1)*33+i;
		while((cw-p)%23!=0||(cw-e)%28!=0)
		{
			cw+=33;
		}
		cout<<"Case "<<f<<":"<<" the next triple peak occurs in "<<cw-d<<" days."<<endl;
		f++;
		cin>>p>>e>>i>>d;
	}
}

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