Talk:SPOJ TETRA

program liuke_spoj; var a,b,c,d,e,f,aa,bb,cc,dd,ee,ff:extended; n,i:longint; p,s,v,r:extended;

procedure main; begin read(d,e,f,b,a,c); aa:=a*a; bb:=b*b; cc:=c*c; dd:=d*d; ee:=e*e; ff:=f*f; v:=sqrt(aa*dd*(bb+cc+ee+ff-aa-dd)+bb*ee*(aa+cc+dd+ff-bb-ee)+cc*ff*(aa+bb+dd+ee-cc-ff)-(aa+dd)*(bb+ee)*(cc+ff)/2-(aa-dd)*(bb-ee)*(cc-ff)/2)/12; s:=0; p:=(a+b+c)/2; s:=s+sqrt(p*(p-a)*(p-b)*(p-c)); p:=(a+d+f)/2; s:=s+sqrt(p*(p-a)*(p-d)*(p-f)); p:=(b+d+e)/2; s:=s+sqrt(p*(p-b)*(p-d)*(p-e)); p:=(e+f+c)/2; s:=s+sqrt(p*(p-e)*(p-f)*(p-c)); r:=v/s*3; writeln(r:0:4); end;

begin assign(input,'input.txt'); assign(output,'output.txt'); reset(input); rewrite(output); read(n); for i:=1 to n do   main; close(input); close(output); end.

Why the answer is not right? And just got a bit wrong?