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 |
贴出来,我放弃了,在下面怎么测试怎么过,一上去就AC。哪位仁兄给一组测试数据啊?谢了。#include<iostream> using namespace std; int main(void) { int p=0,e,i,d,t=1,res; cin>>p>>e>>i>>d; while(p!=-1) { if(p==e&&e==i&&p<=d) res=p+21252; else { if(e>28) res=e; else res=e+28; while((res-p)%23!=0) res+=28; while((res-i)%33!=0) res+=644; } res-=d; if(res>21252) res-=21252; cout<<"Case "<<t++; cout<<": the next triple peak occurs in "; cout<<res<<" days."<<endl; cin>>p>>e>>i>>d; } system("pause"); return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator