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 |
帮我看看错在哪里?谢谢program biorhythms; var a:array[1..3]of integer; n,ca,i,j,k:longint; begin fillchar(a,sizeof(a),0); ca:=0; for i:=1 to 3 do read(a[i]); readln(k); while a[1]>=0 do begin for i:=0 to 644 do begin for n:=0 to 32 do if (n-a[3])mod 33=0 then a[3]:=n; j:=a[3]+33*i; if ((j-a[1])mod 23=0)and((j-a[2])mod 28=0)and(j>k) then break; end; j:=j-k; inc(ca); writeln('Case ',ca,': the next triple peak occurs in ',j,' days.'); for i:=1 to 3 do read(a[i]); readln(k); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator