|
|
back to boardWhat's wrong, the judge throws me wrong answer program reverseroot; const max=10000000; type tipovec=array[1..max] of double; var i:int64; n:double; vec:tipovec; j:longint; begin i:=1; while not(eof) do begin read(n); vec[i]:=sqrt(n); inc(i); end; for j:=i-1 downto 1 do begin writeln(vec[j]:0:4); end; end. No subject Posted by icanwin 18 Oct 2009 13:40 Edited by author 18.10.2009 13:59 Re: What's wrong, the judge throws me wrong answer Posted by melkiy 18 Oct 2009 20:01 i think you should check for EOF after a read attempt, not before it |
|
|