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

Why WA????

Posted by mwj43 at 2006-09-20 19:26:46 on Problem 1006
#include <stdio.h>

int main()
{
	int p, e, i, d = 0, count = 1;
	scanf("%i%i%i%i", &p, &e, &i, &d);
	while (d != -1)
	{
		do
			p += 23;
		while (p <= d);
		while ((p-e) % 28)
			p += 23;
		while ((p-i) % 33)
			p += 644;
		printf("Case %i: the next triple peak occurs in %i days.\n", count++, p-d);
		scanf("%i%i%i%i", &p, &e, &i, &d);
	}
	return 0;
}

*** Please post English

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