|
|
вернуться в форумWhy wrong answer? {N$+} var a:array[1..1000]of extended; b:array[1..1000]of extended; l,m,n:extended; i,k:integer; f1,f2:text; begin assign(f1,'input.txt'); assign(f2,'output.txt'); reset(f1); rewrite(f2); while not eof(f1) do begin read(f1,l); i:=i+1; a[i]:=l; end; for k:=1 to i do begin b[k]:=sqrt(a[k]); end; for k:=i downto 1 do writeln(f2,b[k]:0:4); close(f1); close(f2); end. I don't believe...That works right on my computer but WA1!!! Re: Why wrong answer? see faq -don't use i/o files -use seekeof for numbers -arrays [1000] is not enough Re: Why wrong answer? Thank's a lot |
|
|