# Arup Guha
# 7/22/2205
# Solution to 2025 SI@UCF Contest #5 Problem: Uneven Walking

nC = int(input())

# Process cases.
for loop in range(nC):

    toks = input().split()
    right = int(toks[0])
    left = int(toks[1])
    tot = int(toks[2])

    # How many times Arup does both the right and the left before the end.
    both = tot//(left+right)

    # Leftover after those steps.
    rest = tot%(left+right)

    # If it's perfect, then this works.
    if rest == 0:
        print(2*both)

    # What's left over is covered by the right foot.
    elif rest <= right:
        print(2*both+1)

    # Need to do both right and left to go past the destination.
    else:
        print(2*both+2)
