| ||||||||||
| 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 | |||||||||
请教高手:为什么在vc通过,在这里提交会出现“run time error”?#include <stdio.h>
#include <math.h>
void main()
{
int a,b,c,d,x,j[10],i,k;
for (i=1;;i++)
{
scanf("%d%d%d%d",&a,&b,&c,&d);
if (a==-1&&b==-1&&c==-1&&d==-1) break;
for (x=33;;x++)//穷举算法
if (x%23==a%23&&x%28==b%28&&x%33==c%33)
break;
j[i]=x-d;
}
for (k=1;k<i;k++)
printf("Case %d: the next triple peak occurs in %d days.\n",k,j[k]);
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator