program hungry;
uses math;
var
t,i,j,l,d,s:longint;
sa,sb,ss,sd,c,rb,x,da,db,ans:double;
begin
assign(input,'hungry.in');
assign(output,'hungry.out');
reset(input);
rewrite(output);
readln(t);
x:=3.14159265357;
for i:=1 to t do
begin
readln(l,d,s);
ss:=l*d/2;
c:=sqrt(l*l+d*d);
rb:=s-c;
sb:=2*x*rb;
da:=arctan(l/2/d)*2;
sa:=2*x*s*((2*x-da)/(2*x));
db:=arctan(d/(l/2))*2;
sd:=sb*(db/2*x);
ans:=sa+sb+ss-sd;
writeln(ans:0:2);
end;
close(input);
close(output);
end.