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

ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by hleb 12 Dec 2007 14:22
var a:array[1..1000000] of int64;
    i,j:longint;
begin
{$IFNDEF ONLINE_JUDGE}
assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);
{$ENDIF}
i:=0;
while not seekeof do begin
inc(i);
read(a[i]);
end;
for j:=i downto 1 do
writeln(sqrt(a[j]):0:4);
{$IFNDEF ONLINE_JUDGE}
close(input);
close(output);
{$ENDIF}
readln;
end.
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by Emilbek 27 May 2008 15:14
Hey it is wrong
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by PasGal 22 Jun 2008 05:17
my solution is the same but it gets WA#1 :)
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by wjy 21 Aug 2008 15:15
good
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by Roman Ivanovich 26 Oct 2008 23:48
Thanks)
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by BlackShark 19 Dec 2008 00:20
Thanks a lot! Accepted!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Re: ACCEPTED 1001 PASCAL!!! FOR REAL NOOBS!!!
Posted by zj_ys 9 Jan 2009 16:12
TYPE
  node=^Tnode;
  Tnode=Record
    data:Extended;
    next:node;
  END;
VAR
  n:Qword;
  k:Extended;
  list,temp:node;
BEGIN
  new(list);
  list^.next:=nil;
    while not seekeof do
      BEGIN
        read(n);
        k:=sqrt(n);
        new(temp);
        temp^.data:=k;
        temp^.next:=list^.next;
        list^.next:=temp;
      END;
    while list^.next<>nil do
      BEGIN
        writeln(list^.next^.data:0:4);
        list^.next:=list^.next^.next;
      END;
END.