Chef has N empty bottles where each bottle has a capacity of X litres.  
There is a water tank in Chefland having K litres of water. Chef wants to fill the empty bottles using the water in the tank.  

Assuming that Chef does not spill any water while filling the bottles, find out the maximum number of bottles Chef can fill completely.

------ Input Format ------ 

- First line will contain T, number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, three integers N, X, and K.

------ Output Format ------ 

For each test case, output in a single line answer, the maximum number of bottles Chef can fill completely.

------ Constraints ------ 

$1 ≤ T ≤ 100$
$1 ≤ N, X ≤ 10^{5}$
$0 ≤ K ≤ 10^{5}$

----- Sample Input 1 ------ 
3
5 2 8
10 5 4
3 1 4
----- Sample Output 1 ------ 
4
0
3
----- explanation 1 ------ 
Test Case $1$: The amount of water in the tank is $8$ litres. The capacity of each bottle is $2$ litres. Hence, $4$ water bottles can be filled completely.

Test Case $2$: The amount of water in the tank is $4$ litres. The capacity of each bottle is $5$ litres. Hence, no water bottle can be filled completely.

Test Case $3$: The amount of water in the tank is $4$ litres. The capacity of each bottle is $1$ litre. Chef has $3$ bottles available. He can fill all these bottles completely using $3$ litres of water.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
t = int(input())
for i in range(t):
	(n, x, k) = map(int, input().split())
	bottle = 0
	if n * x <= k:
		print(n)
	else:
		for i in range(1, n + 1):
			if x * i <= k:
				bottle = bottle + 1
		print(bottle)


t = int(input())
for i in range(t):
	(n, x, k) = map(int, input().split())
	if k // x < n:
		print(k // x)
	elif k // x > n:
		print(n)
	else:
		print('0')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if z // y < x:
		print(z // y)
	elif z // y > x:
		print(x)
	else:
		print(0)


t = int(input())
for i in range(t):
	(n, x, k) = map(int, input().split())
	ans = k // x
	if ans > n:
		print(n)
	else:
		print(ans)


tst = int(input())
for i in range(tst):
	(n, y, z) = map(int, input().split())
	if z // y < n:
		print(z // y)
	elif z // y > n:
		print(n)
	else:
		print(0)


T = int(input())
for A in range(T):
	bottles = 0
	(N, X, K) = map(int, input().split())
	if N * X <= K:
		print(N)
	else:
		for i in range(1, N + 1):
			if X * i <= K:
				bottles = bottles + 1
		print(bottles)


T = int(input())
for i in range(T):
	(N, X, K) = map(int, input().split())
	if K > X:
		y = int(K / X)
		if y > N:
			print(N)
		else:
			print(y)
	else:
		print(0)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	d = c // b
	if a >= d:
		print(d)
	elif a < d:
		print(a)


n = int(input())
for i in range(0, n):
	(a, b, c) = list(map(int, input().split()))
	if b < c:
		x = c // b
		if x < a:
			print(x)
		else:
			print(a)
	else:
		print('0')


for T in range(int(input())):
	bottles = 0
	(n, x, k) = map(int, input().split())
	if n * x <= k:
		print(n)
	else:
		for i in range(1, n + 1):
			if x * i <= k:
				bottles = bottles + 1
		print(bottles)


for _ in range(int(input())):
	(n, x, k) = map(int, input().split(' '))
	if k // x >= n:
		print(n)
	elif n > k // x > 0:
		print(k // x)
	else:
		print(0)


T = int(input())
for _ in range(T):
	(a, b, c) = map(int, input().split())
	if c // b < a:
		print(c // b)
	elif c // b > a:
		print(a)
	else:
		print(0)


t = int(input())
for i in range(0, t):
	water = list(map(int, input().split()))
	temp = water[2] // water[1]
	if temp >= water[0]:
		print(water[0])
	else:
		print(temp)


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	if c // a < b:
		print(c // b)
	elif c // a >= b:
		print(a)
	else:
		print(0)


for _ in range(int(input())):
	(N, X, K) = map(int, input().split())
	print(K // X if K // X <= N else N)


for i in range(int(input())):
	(n, x, k) = map(int, input().split())
	m = 0
	if n * x <= k:
		print(n)
	else:
		for i in range(1, n + 1):
			if x * i <= k:
				m = m + 1
		print(m)


for _ in range(int(input())):
	(n, x, k) = map(int, input().split())
	r = k // x
	if r > n:
		print(n)
	else:
		print(r)


t = int(input())
for i in range(t):
	str = input()
	c = 0
	str = str.split()
	for i in range(0, int(str[0])):
		if int(str[2]) - c * int(str[1]) >= int(str[1]):
			c = c + 1
		else:
			break
	print(c)


t = int(input())
for i in range(t):
	(N, X, K) = map(int, input().split())
	A = K // X
	if A >= N:
		print(N)
	else:
		print(A)


t = int(input())
for i in range(t):
	(m, n, o) = map(int, input().split())
	if o // n <= m:
		print(o // n)
	else:
		print(m)


t = int(input())
for i in range(t):
	(n, x, m) = map(int, input().split())
	b = m // x
	if n > b:
		print(b)
	else:
		print(n)


for i in range(int(input())):
	(a, b, c) = list(map(int, input().split()))
	if c // b > a:
		print(a)
	else:
		print(c // b)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = z // y
	if a <= x:
		print(a)
	else:
		print(x)


for i in range(int(input())):
	(n, x, k) = map(int, input().split())
	bottles = k // x
	if bottles > n:
		bottles = n
	print(bottles)


testcase = int(input())
while testcase > 0:
	(n, x, k) = map(int, input().split())
	no_of_water_bottles = k // x
	if no_of_water_bottles >= n:
		print(n)
	else:
		print(no_of_water_bottles)
	testcase -= 1


T = int(input())
for i in range(T):
	x = list(map(int, input().split()))
	(N, X, K) = (x[0], x[1], x[2])
	if int(K / X) >= N:
		print(N)
	if int(K / X) < N:
		print(int(K / X))


for _ in range(int(input())):
	(n, x, k) = map(int, input().split())
	b = 0
	if n * x <= k:
		print(n)
	else:
		for i in range(1, n + 1):
			if x * i <= k:
				b += 1
		print(b)


m = int(input())
for i in range(m):
	(m, x, k) = map(int, input().split())
	res = k // x
	if m >= res:
		print(res)
	else:
		print(m)


import math
for i in range(int(input())):
	(n, x, k) = map(int, input().split())
	a = n * x
	if k < x:
		print('0')
	elif k == x:
		print('1')
	else:
		print(min(n, k // x))


for i in range(int(input())):
	(n, x, k) = map(int, input().split())
	print(int(min(k, n * x) / x))


for _ in range(int(input())):
	(n, x, k) = map(int, input().split())
	cap = k // x
	res = cap if cap <= n else n
	print(res)


for i in range(int(input())):
	(n, x, k) = list(map(int, input().split()))
	a = int(k / x)
	if n > a:
		print(a)
	else:
		print(n)


t = int(input())
while t > 0:
	(n, x, k) = map(int, input().split())
	if n > k // x:
		print(k // x)
	else:
		print(n)
	t -= 1


t = int(input())
for _ in range(t):
	(n, x, k) = map(int, input().split(' '))
	bottles = min(n, int(k // x))
	print(bottles)


t = int(input())
for _ in range(t):
	(n, x, k) = map(int, input().split())
	count = 0
	for i in range(1, n + 1):
		if i * x <= k:
			count += 1
	print(count)


T = int(input())
for i in range(T):
	(n, x, k) = map(int, input().split())
	if x < k:
		ma = k // x
		if ma < n:
			print(ma)
		else:
			print(n)
	else:
		print(0)