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

继续查错吧,加油!

Posted by Sempr at 2006-04-25 21:07:53 on Problem 1006
In Reply To:Also wrong Anwser Posted by:winter_1 at 2006-04-25 20:38:09
> #include<stdio.h>
> #include<math.h>
> void main()
> {
> 	int p,e,i,d;
> 	int k=0;
> 	scanf("%d %d %d %d",&p,&e,&i,&d);
> 	while(!(p==-1&&e==-1&&i==-1&&d==-1)){
> 		p=p%23;
> 		int j=0;
> 		while(p+j*23<=21252){
> 			if((p+j*23-e)%28==0&&(p+j*23-i)%33==0&&(p+j*23)>=d){
> 				if(d==0&&(p+j*23)==0){
> 					goto k;
> 				}
> 				else{
> 				k++;
> 				printf("Case %d: the next triple peak occurs in %d days.\n",k,p+j*23-d);
> 				break;
> 				}
> 			}
> k: j++;
> 		}
>         scanf("%d %d %d %d",&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