# Arup Guha
# 2/16/2026
# Solution to COP 4516 Team Final Contest Problem: UFO Sighting

import math

# Process cases
nC = int(input())
for loop in range(nC):

    # Read input convert angles to degrees.
    toks = input().split()
    d = int(toks[0])
    angleA = int(toks[1])*math.pi/180
    angleB = int(toks[2])*math.pi/180

    # We can draw the altitude to the ground to a point Y.
    # Label the distance from you to Y as x, so the distance
    # from Mulder to Y is d-x. Let h be the height of UFO.
    # Set up two tangent equations with the 2 right triangles:
    # tan(A) = h/x, tan(B) = h/(d-x). So x = h/tan(A).
    # Substitute this into the second equation:
    # (d - h/tan(A))*tan(B) = h and put h on one side:
    # h(tan(A)+tan(B))/tan(A) = d*tan(B), then solve for h
    # h = d*tan(A)*tan(B)/(tan(A)+tan(B)
    tanProd = math.tan(angleA)*math.tan(angleB)
    tanSum  = math.tan(angleA)+math.tan(angleB)
    
    print(d*tanProd/tanSum)
