uses math;
const
p=3.1415926535897932384626433;
var
t,i,d,s:longint;
l,x,y,ans,a:double;
begin
assign(input,'hungry.in');reset(input);
assign(output,'hungry.out');rewrite(output);
read(t);
for i:=1 to t do begin
read(l,d,s);
l:=l/2;
if s<=d then begin
writeln(s*s*p:0:2);
continue;
end;
if s*s<=l*l+d*d then begin
a:=arccos(d/s);
ans:=s*s*(2*p-a)/2+sqrt(s*s-d*d)*d;
writeln(ans:0:2);
continue;
end;
a:=arctan(l/d);
ans:=s*s*(p-a)+d*l;
x:=s-sqrt(d*d+l*l);
a:=a+p/2;
ans:=ans+x*x*a;
if x>l then begin
a:=arccos(l/x);
ans:=ans-x*x*a+sqrt(x*x-l*l)*l;
end;
writeln(ans:0:2);
end;
close(input);close(output);
end.