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 1023. Buttons

why time timit 10 test?
Posted by Александр 5 May 2011 18:00
var i,j:integer;
l,k,p,m:int64;

begin

  read(k);
  p:=0;
  l:=2;
    while p<>1 do begin
      m:=l+1;
      i:=0;
      while i<k do begin
        i:=i+m;
        p:=i;
      end;
      if p=k then begin
        write(L);
        halt;
      end else begin
        p:=0;
        inc(l);
      end;

    end;


end.