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 |
Re:帮我看看哪里错了,为什么老是过不了。。。In Reply To:帮我看看哪里错了,为什么老是过不了。。。 Posted by:xiaoyaogui at 2011-07-05 16:12:24 > #include<stdio.h> > main() > { > int p[20],e[20],i[20],d[20]; > int a[20][4]; > int j,k,s=0,t,m; > while(1) > { > for(t=0;t<4;t++) > scanf("%d",&a[s][t]); > if(a[s][0]==-1) break; > s++; > } > for(j=0;j<s;j++) > { > for(k=1;((a[j][0]+23*k-a[j][1])%28!=0)||((a[j][0]+23*k-a[j][2])%33!=0);k++) ; > m=a[j][0]+23*k-a[j][3]; > printf("Case %d: the next triple peak occurs in %d days.\n",j+1,m); > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator