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 IC0590501212 at 2005-11-21 01:08:03 on Problem 1006
#include<stdio.h>
void main(){
	int a,b,c,d,f,e=1;
	scanf("%d%d%d%d",&a,&b,&c,&d);
	while(a!=-1&&b!=-1&&c!=-1&&d!=-1){
		for(f=d+1;f<=21252;f++)
			if((f-a)%23==0&&(f-b)%28==0&&(f-c)%33==0) break;
		printf("Case %d: the next triple peak occurs in %d days.\n",e,f-d);
		e++;
		scanf("%d%d%d%d",&a,&b,&c,&d);
	}
}

为什么答案没错,却总是wrong answer?

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