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 |
哪里错了?thank you very much#include <iostream.h> void main() { int a,b,c,d,t=0; while(1) { t++; cin>>a>>b>>c>>d; if(a<=-1&&b<=-1&&c<=-1&&d<=-1) return; for(int i=a; ;i+=23) { if(a==0&&b==0&&c==0) i=23*28*33; if((i-b)%28==0 && (i-c)%33==0) break; } cout<<"Case "<<t<<": the next triple peak occurs in "<<i-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