var
t,i,l,d,s:longint;
xiebian,mianji,dibian,n,x,now,h,nn,r,xiaos:double;
begin
assign(input,'hungry.in'); reset(input);
assign(output,'hungry.out'); rewrite(output);
readln(t);
for i:=1 to t do
begin
readln(l,d,s);
xiebian:=(l*l/4)+d*d;
mianji:=pi*s*s;
dibian:=sqrt(s*s-d*d)*2;
n:=arctan(dibian/(2*d))*2/pi*180;
if s<=d then writeln(mianji:0:2);
if (d*d<s*s)and(s*s<=xiebian) then
writeln(mianji+(dibian*d)/2-n/360*mianji:0:2);
if (s*s>xiebian)and(s<=sqrt(xiebian)+l/2) then
begin
x:=l*s/sqrt(xiebian);
h:=sqrt(s*s-x*x/4);
nn:=90+arctan(l/(2*d))/pi*180;
r:=sqrt(xiebian);
r:=s-r;
xiaos:=pi*r*r;
now:=arctan(l/(2*d))*2/(pi*2)*mianji;
writeln(mianji- now + l*d/2
+2*(xiaos*nn/360):0:2);
end;
end;
close(input);
close(output);
end.