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 joggi at 2004-05-27 15:56:47 on Problem 1006
#include <stdio.h>

void main(void) {
	int p,e,i,d,n = 0,days;
	scanf("%d %d %d %d",&p,&e,&i,&d);
	while(p != -1 && e != -1 && i != -1 && d !=-1) {
		n++;
		while((p != e) || (p != i)) {
			if(p < e) {
				p += 23;
			}
			else if(e < i){
				e += 28;
			}
			else {
				i += 33;
			}
		}
		days = p - d;
		if(days <= 0) {
			days += 21252;
		}
		printf("Case %d: the next triple peak occurs in %d days.\n",n,days);
		scanf("%d %d %d %d",&p,&e,&i,&d);
	}
}
自己的机器没有问题,这里怎么会wa啊?

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