from math import sqrt,floor N = int(input()) for _ in range(N): T, m, L = map(float, input().split()) ans = -10 * m * T + sqrt((10*m*T)**2 + 20*m*L) ans = ans * 0.001 * 3600 n = 5 ans = floor(ans * 10 ** n) / (10 ** n) i = str(ans).find('.') if len(str(ans)) - i == 2: print(str(ans) + '0') elif len(str(ans)) - i == 1: print(str(ans) + '00') else: print(str(ans)[:i+3])