| ||||||||||
| 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:为什么一直出错啊?我在本地测试全部通过啊!郁闷 ing!!In Reply To:为什么一直出错啊?我在本地测试全部通过啊!郁闷 ing!! Posted by:cugwei at 2004-04-24 15:35:09 me too
> #include<iostream.h>
> void main()
> {
> int p,e,i,d;
> int cw,f=1;
> cin>>p>>e>>i>>d;
> while(p!=-1||i!=-1||e!=-1||d!=-1)
> {
> if(p==0&&i==0&&e==0&&d==0) cw=33;
> else if((d-i)%33==0) cw=d;
> else cw=((d-i)/33+1)*33+i;
> while((cw-p)%23!=0||(cw-e)%28!=0)
> {
> cw+=33;
> }
> cout<<"Case "<<f<<":"<<" the next triple peak occurs in "<<cw-d<<" days."<<endl;
> f++;
> cin>>p>>e>>i>>d;
> }
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator