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:presentation error,唉

Posted by frkstyc at 2006-02-26 22:14:00 on Problem 1006
In Reply To:presentation error,唉 Posted by:cpp06_00548138 at 2006-02-26 22:12:48
> #include<iostream.h>
> int a,b,c,d,i,m;
> void main(){	
> 	for(m=1;;m++){
> 	cin>>a>>b>>c>>d;
> 	if(a==-1 && b==-1 && c==-1 && d==-1)break; 
> 	for(i=d+1;;i++)
> 		if((i-b)%28==0)break;
> 	for(;;i+=28)
> 		if((i-c)%33==0)break;
> 
> 	for(;;i+=28*33)
> 		if((i-a)%23==0)break;
> 	int j=i-d;
> 	cout<<"Case "<<m<<": the next triple peak occurs in "<<j<<" days." ;
cout<<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