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

为什么总是RUNTIME ERROE

Posted by mickeyandkaka at 2010-11-06 12:26:53 on Problem 1006
代码如下:
#include<stdio.h>
#define N 10

int main()
{
	int array[N][2];
	int p,e,i,d,j,k=0,no=1;
	scanf("%d%d%d%d",&p,&e,&i,&d);
	while(p!=-1&&e!=-1&&i!=-1&&d!=-1)
	{
		for(j=d+1;j<21252;j++)
		    if((j-p)%23==0) break;
        for(;j<21252;j+=23)
            if((j-e)%28==0) break;
        for(;j<21252;j+=23*28)
            if((j-i)%33==0) break;
        array[k][0]=no;array[k][1]=j-d;k++;
        scanf("%d %d %d %d",&p,&e,&i,&d);
        no++;
	}
	for(k=0;k<no-1;k++)
	{printf("Case %d",array[k][0]);
    printf(": the next triple peak occurs in %d days.\n",array[k][1]);}
	return 0;
}

结果总是RUNTIME ERROR 答案貌似没错 为什么呢?

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