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 |
presentation error,唉#include<iostream.h> int a,b,c,d,i,m; void main(){ for(m=1;;m++){ cin>>a>>b>>c>>d; if(a==-1 && b==-1 && c==-1 && d==-1)break; for(i=d+1;;i++) if((i-b)%28==0)break; for(;;i+=28) if((i-c)%33==0)break; for(;;i+=28*33) if((i-a)%23==0)break; int j=i-d; cout<<"Case "<<m<<": the next triple peak occurs in "<<j<<" days." ; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator