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:到底题目还有什么玄机,怎么总是wrong answer,测试数据太少了,看不出来啊,有高手指点一下吗?In Reply To:到底题目还有什么玄机,怎么总是wrong answer,测试数据太少了,看不出来啊,有高手指点一下吗? Posted by:00348264 at 2004-10-13 21:18:53 > #include<iostream.h> > void main() > { > long a,b,c,d,t; > for(int i=1;;i++) > { > cin>>a>>b>>c>>d; > if(a==-1) > break; > t=d+33-(d-c)%33; > while(1) > { > if((t-b)%28==0&&(t-a)%23==0) > { > cout<<"Case "<<i<<": the next triple peak occurs in "<<t-d<<" days."<<endl; > break; > } > t+=33; > } > } > } > Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator