from math import radians, sin class Angle: def __init__(self, degrees): self.degrees = degrees def __sub__(self, other): return Angle(self.degrees - other.degrees) def sine(self): return sin(radians(self.degrees)) for _ in range(int(input())): angle1, angle2 = map(int, input().split()) a1, a2 = Angle(angle1), Angle(angle2) print("{:.2f}".format((a1 - a2).sine()))