from math import isqrt for _ in range(int(input())): tf, mf, lf = map(float, input().split()) t = int(tf * 100 + 0.5) m = int(mf * 100 + 0.5) l = int(lf * 100 + 0.5) r2 = 36 * 36 * ((10 * m * t) ** 2 + 20 * 10000 * m * l) r = isqrt(r2) ans = r - 360 * m * t ans //= 1000 print(f'{ans // 100}.{ans % 100:02d}') # vt+v^2/20m=l # v^2 +20mt v -20ml=0 # v=-10mt + sqrt((10mt)^2+20ml) = 20ml / (10mt + sqrt((10mt)^2+20ml))