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:所有数据都通过了,Runtime error是怎么回事In Reply To:所有数据都通过了,Runtime error是怎么回事 Posted by:20080020 at 2009-05-19 15:55:36 > 谢谢 附上程序: #include "stdio.h" int main() {int p[20]={0},e[20],i[20],d[20],j,k=0; long p1,e1,i1,num[20]; do{ scanf("%d%d%d%d",&p[k],&e[k],&i[k],&d[k]); }while(p[k++]>-1); for(j=0;j<k-1;j++) {p1=(p[j]%23)*5544; e1=(e[j]%28)*14421; i1=(i[j]%33)*1288; p1+=e1+i1; num[j]=p1-(p1/21252)*21252-d[j]; } for(j=1;j<k;j++) {if(num[j-1]<=0) num[j-1]+=21252; printf("Case %d: the next triple peak occurs in %ld days.\n",j,num[j-1]); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator