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 90303115 at 2003-11-16 15:05:47 on Problem 1006
#include<stdio.h>
void main()
{
int p,e,i,d,y,l[100],a=1,b=1,c;
while(1){
scanf("%d %d %d %d",&p,&e,&i,&d);	
	 if(p==-1&&e==-1&&i==-1&&d==-1)
	 {while(b<=a);	
	 b++;
	 printf(" the next triple peak occurs in %d days\n",l[b]);
	 }
	 else{
	     a++;
	     y=d+1;
	     while (((y-p)%23==0&&(y-e)%28==0&&(y-i)%33==0)==0)
              	y++;
		 l[a]=y-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