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

Help! Where's my error?
Posted by Alexander Kosm 7 Mar 2007 17:44
var t,c,i,n,k:integer;
begin
read (n,k);
i:=1;

while i<n do
begin
If c<k then c:=c+1;
i:=i+c;
t:=t+1;
end;
If n=-1 then t:=-1;
writeln (t);

end.

Edited by author 12.09.2007 19:47