n = int(input()) for _ in range(n): b, a, c = map(float, input().split()) v = 2 * (5 ** .5 * (a * (5 * a * b ** 2 + c)) ** .5 - 5 * a * b) x, y = str(v * 3600 / 1000).split('.') print(x, y[:2][::-1].zfill(2)[::-1], sep='.')