题解 | #qwb与电阻#
qwb与电阻
https://ac.nowcoder.com/acm/problem/14744
# 利用自似性推公式
# x||r2 +r1+r3==x
# 1/2 (r1 + r3 + Sqrt[r1 + r3] Sqrt[r1 + 4 r2 + r3])
from math import *
t=int(input())
while t:
t=t-1
r1,r2,r3=map(int,input().split())
ans=0.5*(r1+r3+sqrt(r1+r3)*sqrt(r1+4*r2+r3))
print('{:.2f}'.format(ans))