ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1131. Copying

Why I get Compile Error. Pls help.
Posted by meoden 9 May 2002 19:41
Here's my code:

var n,k,s,t:longint;
begin
   readln(n,k);
   s:=1;
   for t:=1 to 31 do
   begin
      s:=s*2;
      if s>n then break;
      if s>k then
      begin
         t:=t+(n-s+k-1) div k;
         break;
      end;
   end;
   writeln(t);
end.
It's only 15 lines. Help,please.
Posted by meoden 9 May 2002 19:43
Oh, sorry. Now I know why it gets CE.
Posted by meoden 9 May 2002 20:26
>