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:为什么我的程序输出是正确的却通不过啊。高手帮忙一下1006题目

Posted by royy_zhou at 2012-09-06 14:03:45
In Reply To:为什么我的程序输出是正确的却通不过啊。高手帮忙一下1006题目 Posted by:382784268 at 2008-09-25 21:37:42
> 
> #include<iostream>
> using namespace std;
> int main(int argc, char* argv[])
> {
> 	int p,e,i,d,m=1;
> 	cin>>p>>e>>i>>d;
> 	while(p!=-1&&e!=-1&&i!=-1&&d!=-1)
> 	{
> 		for(int j=1; ;j++)
> 		{
> 			if((23*j+p-e)%28==0&&(23*j+p-i)%33==0)
> 			{
> 				cout<<"case "<<m++<<": the next triple peak occurs in "<<(23*j+p-d)<<" days."<<endl;
> 				break;
> 			}
> 		}
> 		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