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

read FAQ before you guess!!!!!!

Posted by frkstyc at 2006-02-22 22:36:16 on Problem 1006
In Reply To:请问是不是时间要求完成不了,或者内存的完成不了就WR了 Posted by:tsunamimj at 2006-02-22 22:21:16
> 郁闷中,测试了可以过
> 而且我的代码和正确的长得也差不多...
> FT
> 帖一下我的
> #include < iostream.h >
> #include < math.h >
> 
> void main()
> {
> 	int p,e,i,d,nCount=0;
> 	
> 	for(;;){
> 		cin >> p >> e >> i >> d;
> 		if(p == -1 && e == -1 && i == -1 && d == -1)break;
> 		nCount++;
> 		for(int j = 1;j <= 21252;j ++){
> 			if( (j - p)% 23 == 0 &&(j - e)% 28 ==0 &&(j - i) % 33 == 0)
> 				cout<<"Case "<< nCount <<": the next triple peak occurs in "
> 					<< j - 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