import math n = int(input()) for _ in range(n): t,mu,l = map(float,input().split()) ans = 3.6 * math.sqrt( (10*mu*t)**2 + 20*mu*l) - 36 * mu * t moji = str(ans) + "0" * 10 if 0 <= ans < 10.0: print(moji[:4]) elif 10.0 <= ans < 100.0: print(moji[:5]) elif 100.0 <= ans < 1000.0: print(moji[:6]) else: print(moji[:7])