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 |
没想明白哪里错了 自己运行测试用例过了提交上去一直运行错误 求大神帮忙看看#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator