from math import sqrt,floor N = int(input()) for _ in range(N): T, m, L = map(float, input().split()) ans = -10 * m * T + sqrt(100*m*m*T*T + 20*m*L) ans = ans * 0.001 * 3600 ans = float(str(ans)[:str(ans).find('.')+3]) print(format(ans,'.2f'))