| ||||||||||
| 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 | |||||||||
read FAQ before you guess!!!!!!In Reply To:请问是不是时间要求完成不了,或者内存的完成不了就WR了 Posted by:tsunamimj at 2006-02-22 22:21:16 > 郁闷中,测试了可以过
> 而且我的代码和正确的长得也差不多...
> FT
> 帖一下我的
> #include < iostream.h >
> #include < math.h >
>
> void main()
> {
> int p,e,i,d,nCount=0;
>
> for(;;){
> cin >> p >> e >> i >> d;
> if(p == -1 && e == -1 && i == -1 && d == -1)break;
> nCount++;
> for(int j = 1;j <= 21252;j ++){
> if( (j - p)% 23 == 0 &&(j - e)% 28 ==0 &&(j - i) % 33 == 0)
> cout<<"Case "<< nCount <<": the next triple peak occurs in "
> << j - d<<" days. "<<endl;
> }
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator