import math
t = int(input())
i=0
ans=0
for i in range(t):
a,b,c = input().split()
a,b,c = int(a), int(b), int(c)
ans = math.ceil(c/a)
an2 = (c/b)
print(int(ans + an2))
aW1wb3J0IG1hdGgKdCA9IGludChpbnB1dCgpKQoKaT0wIAphbnM9MAoKZm9yIGkgaW4gcmFuZ2UodCk6CglhLGIsYyA9IGlucHV0KCkuc3BsaXQoKQoJYSxiLGMgPSBpbnQoYSksIGludChiKSwgaW50KGMpCgkKCWFucyA9IG1hdGguY2VpbChjL2EpIAoJCglhbjIgPSAoYy9iKQoJcHJpbnQoaW50KGFucyArIGFuMikp