t = int(input())
for _ in range(t):
    n = int(input())
    x,y = list(map(int,input().split()))
    print(max(1 + (n-1)//x, 1 + (n-1)//y))
    