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

本地运行无误,可提交报wrong answer?请帮忙

Posted by Refyl at 2006-12-29 16:52:50 on Problem 1006
#include <stdio.h>
int main(){
	int p,e,i,d,k;
	int j=1;
	scanf("%d %d %d %d",&p,&e,&i,&d);
	while(p!=-1){
		for(k=i;;){
			k+=33;
			if(k<d) continue;
			if(!((k-p)%23||(k-e)%28)){printf("Case %d: the next triple peak occurs in %d days.\n",j++,k-d);break;}
		}
		scanf("%d %d %d %d",&p,&e,&i,&d);
	}
	return 0;
}

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