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

PLESE TELL ME!!! Where is my code error!!
Posted by Linis 22 Jan 2008 13:23

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!!
Posted by 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.
Re: PLESE TELL ME!!! Where is my code error!!
Posted by Linis 23 Jan 2008 14:46
Thank you!!!
Re: PLESE TELL ME!!! Where is my code error!!
Posted by Unstable 25 Feb 2008 14:09
Third one: you should use extended type, not int64 one