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 1001. Reverse Root

Show all messages Hide all messages


var
a : array [1.. 10000000000000000] of int64;
n,i : longint;
begin
{$IFNDEF ONLINE_JUDGE}
assign (input,'Input.txt');
assign (output,'Output.txt');
reset (input);
rewrite (output);
{$ENDIF}
I:=0;
 while not seekeof do
  begin
   inc(i);
   read(a[i]);
   for n:=i downto 1 do
    writeln(sqrt(a[n]));
    end;
{$IFNDEF ONLINE_JUDGE}
 close(input);
 close(output);
{$ENDIF}
readln;
end.
Re: PLESE TELL ME!!! Where is my code error!! Romko [Lviv NU] 23 Jan 2008 01:35
First: You needn't so big array...
Second: Try first to read whole input, and than output it in reverse oreder.
Thank you!!!
Third one: you should use extended type, not int64 one