|
|
вернуться в форумWhy Wrong answer(Pascal) Послано Sasha 20 ноя 2007 23:44 program BackSQRT; {$APPTYPE CONSOLE} uses SysUtils; var f,fout: Text; a:array[0..99999999] of extended; tmp: int64; count,j: 0..99999999; begin Count:=0; assignfile(f,'input.txt'); reset(f); while not Eof(f) do begin while not Eoln(f) do begin read(f,tmp); if tmp<0 then continue; a[count]:=tmp; inc(count); // -1 end; readln(f); end; closefile(f); assignfile(fout,'out.txt'); rewrite(fout); for j:=count-1 downto 0 do writeln(fout,sqrt(a[j]):0:4); closefile(fout); end. Re: Why Wrong answer(Pascal) use standart input and output stream... |
|
|