|
|
back to boardHelp me, please? Why time limit exceeded 9? var k,n,m: Real; koren, p: Real; ok: Boolean; begin Readln(n); k:=0; p:=0; repeat ok:=false; m:=n+p; koren := (-1+sqrt(1+8*m))/2; if frac(koren) < 1e-18 then begin writeln(round(k+1),' ',round(koren - k)); ok:=true; end else begin k := k + 1; p:= (sqr(k) + k)/2; end; Until ok; End. Re: Help me, please? Why time limit exceeded 9? Posted by Madhav 13 Jun 2008 01:34 i am also getting time limit exceeded for test 9 |
|
|