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 kawalee at 2003-11-19 10:36:30 on Problem 1006
#include <stdio.h>
#include <math.h>

void main()
{
	int a,b,c,d,x,y,i;
	for (i=1;;i++)
	{
		scanf("%d%d%d%d",&a,&b,&c,&d);
		if (a==-1&&b==-1&&c==-1&&d==-1) break;
		
		else {for (x=1;;x++)
			if (x%23==a%23) break;
				for (y=x;;y+=23)
					if (y%28==b%28) break;
				for (x=y;;x+=644)
					if (x%33==c%33) break;
				
			printf("Case %d: the next triple peak occurs in %d days.\n",i,x-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