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:各路高手 帮忙看看吧 结果一样的 却是wcIn Reply To:各路高手 帮忙看看吧 结果一样的 却是AC Posted by:youyou at 2007-07-24 09:58:39 > #include <stdio.h> > int main() > { > int p,e,i,d,m,j; > scanf("%d%d%d%d",&p,&e,&i,&d); > m=0; > while(p>=0&&e>=0&&i>=0&&d>=0) > { > for(j=0;p<=21252;j++) > { > p=p+23; > if((p-e)%28==0&&(p-i)%33==0) > break; > } > m++; > printf("Case %d: the next triple peak occurs in %d days.\n",m,p-d); > scanf("%d%d%d%d",&p,&e,&i,&d); > } > return 0; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator