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 KAYY at 2019-02-12 15:10:04 on Problem 1006
#include<stdio.h>
int main()
{
	int a[100][4],i,n,j;
	for(i=0;;i++)
	{
		scanf("%d%d%d%d",&a[i][0],&a[i][1],&a[i][2],&a[i][3]);
		if(a[i][0]==-1)break;
	}
	n=i;

	for(i=0;i<n;i++)
	{
		for(j=a[i][3];j<=21252;j++)
			if((j-a[i][0])%23==0&&(j-a[i][1])%28==0&&(j-a[i][2])%33==0&&j!=a[i][0]&&j!=a[i][1]&&j!=a[i][2]&&j!=a[i][3])break;
		printf("Case %d: the next triple peak occurs in %d days.\n",i+1,j-a[i][3]);	
	}
	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