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 |
求救啊!!!!!!!!!!屎不过去了 有的数据都测了 没错var n,i,j,k,l,b:longint; p,e,d:longint; begin readln(p,e,i,d); while (p<>-1) or (e<>-1) or (d<>-1) or (i<>-1) do begin b:=d; p:=p mod 23; e:=e mod 28; i:=i mod 33; inc(l); if d<=d div 23*23+p then d:=d div 23*23+p else d:=(d div 23+1)*23+p; if d mod 28=e then begin if d mod 33=i then begin if d=b then writeln('Case ',l,':',' ','the next triple peak occurs in ',21252,' days.') else writeln('Case ',l,':',' ','the next triple peak occurs in ',d-b,' days.'); end end else while d<=21252 do begin inc(d,23); if d mod 28=e then if d mod 33=i then begin if d=b then writeln('Case ',l,':',' ','the next triple peak occurs in',21252,' days.') else writeln('Case ',l,':',' ','the next triple peak occurs in ',d-b,' days.'); break; end; end; readln(p,e,i,d); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator