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 1490. Fire Circle

PLEASE HELP ME ANYBODY (give me test on 99999)
Posted by tarashi (Kutaisi SU3) 19 Sep 2008 17:51
var n,x,r:integer;
    y2,y,s:int64;

BEGIN
s:=0;
read (n);
r:=n;

 for x:=0 to n-1 do
  begin
   y:=trunc(sqrt(r-x)*sqrt(r+x));

     if y*y<>(r-x)*(r+x) then y:=y+1;

    s:=s+y;
  end;

writeln (s*4);
END.
Re: PLEASE HELP ME ANYBODY (give me test on 99999)
Posted by Sasha Bar [TNU] 4 May 2009 18:15
r = 99999
result = 31415696920