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:_LV111 at 2009-04-04 18:08:01 > 可以通过吗? > 我的程序代码如下: > #include<stdio.h> > int Calcu(int pp,int ee,int ii,int dd); > > int main(void) > { > int p,e,i,d; > int y=1; > scanf("%d %d %d %d",&p,&e,&i,&d); > while(p!=-1&&e!=-1&&i!=-1&&d!=-1) > { > printf("Case %d: the next triple peak occurs in %d days.\n",y++,Calcu(p,e,i,d)); > scanf("%d %d %d %d",&p,&e,&i,&d); > } > return 0; > } > int Calcu(int pp,int ee,int ii,int dd) > { > int x=pp+23; > while(!(x>ee&&x>ii&&(x-ee)%28==0&&(x-ii)%33==0)) > { > x+=23; > } > while(x<=dd) > { > x+=21252; > } > return x-dd; > } > 可是,wa... 题目的意思是不是全部数据输入了之后才可以put out? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator