Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

帮我看看错在哪里?谢谢

Posted by lingyun at 2004-04-02 18:17:34 on Problem 1006
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator