Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么总是RUNTIME ERROE代码如下: #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator