Chef received N candies on his birthday. He wants to put these candies in some bags. A bag has K pockets and each pocket can hold at most M candies. Find the minimum number of bags Chef needs so that he can put every candy into a bag.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of a single line containing three space-separated integers N, K, M.

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

For each test case, print the minimum number of bags Chef needs so that he can put all the candies in one of the bags.

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

$1 ≤ T ≤ 1000$
$1 ≤ N, K, M ≤ 100$

----- Sample Input 1 ------ 
4
6 2 3
3 1 2
8 4 1
25 4 2

----- Sample Output 1 ------ 
1
2
2
4

----- explanation 1 ------ 
Test case $1$: Chef puts $3$ candies in the first pocket of a bag and the remaining $3$ candies in the second pocket. Thus Chef will need only one bag.

Test case $2$: Chef puts $2$ candies in the only pocket of the first bag and the remaining $1$ candy in the only pocket of the second bag. Thus Chef will need two bags.

Test case $3$: Chef puts $4$ candies in the first bag, one candy in each of the $4$ pockets and the same for the second bag. Thus Chef will need two bags.

Test case $4$: Chef puts $2$ candies in each of the $4$ pockets of three bags, one candy in a pocket of the fourth bag.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(n, k, m) = map(int, input().split(' '))
	h = k * m
	if n % h == 0:
		d = n // h
		print(d)
	else:
		d = n // h + 1
		print(d)


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


from math import ceil
for _ in range(int(input())):
	(n, k, m) = map(int, input().split())
	print(ceil(n / (k * m)))


for i in range(int(input())):
	(N, K, M) = map(int, input().split())
	p = M * K
	d = N % p
	if d == 0:
		print(N // p)
	elif d != 0:
		print(N // p + 1)


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


t = int(input())
for i in range(t):
	(n, k, m) = map(int, input().split())
	a = k * m
	total = int(n / a)
	if n % a == 0:
		print(total)
	else:
		print(total + 1)


import math
for t in range(int(input())):
	(n, m, k) = map(int, input().split())
	a = int(math.ceil(n / k))
	print(int(math.ceil(a / m)))


import math
for _ in range(int(input())):
	(N, K, M) = map(int, input().split())
	print(math.ceil(N / (K * M)))


testcase = int(input())
while testcase > 0:
	(n, k, m) = map(int, input().split())
	per_bag_candies = k * m
	if n % per_bag_candies == 0:
		print(n // per_bag_candies)
	else:
		print(n // per_bag_candies + 1)
	testcase -= 1


import math
n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	print(math.ceil(a / (b * c)))


import math
for i in range(int(input())):
	(n, k, m) = map(int, input().split())
	d = k * m
	print(math.ceil(n / d))


t = int(input())
for _ in range(t):
	(n, k, m) = map(int, input().split())
	c = 0
	while n > 0:
		n -= k * m
		c += 1
	print(c)


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a % (b * c) == 0:
		print(int(a / (b * c)))
	else:
		a = a / (b * c)
		print(int(a + 1))


for j in range(int(input())):
	(n, a, b) = map(int, input().split())
	if n % (a * b) == 0:
		print(n // (a * b))
	else:
		n = n // (a * b)
		print(n + 1)


t = int(input())
for i in range(t):
	(N, K, M) = map(int, input().split())
	CapBag = K * M
	if N % CapBag == 0:
		print(N // CapBag)
	else:
		print(N // CapBag + 1)


a = int(input())
for i in range(a):
	(b, c, d) = map(int, input().split())
	e = c * d
	f = b // e
	if b % e == 0:
		print(f)
	else:
		print(f + 1)


for _ in range(int(input())):
	(n, k, m) = map(int, input().split())
	bagc = k * m
	if n % bagc == 0:
		print(n // bagc)
	else:
		print(n // bagc + 1)


import math
for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	print(math.ceil(x / (y * z)))


t = int(input())
while t > 0:
	(n, k, m) = map(int, input().split())
	tc = k * m
	if n % tc == 0:
		print(n // tc)
	else:
		print(n // tc + 1)
	t -= 1


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x % (y * z) == 0:
		print(x // (y * z))
	else:
		print(x // (y * z) + 1)


import math
t = int(input())
for i in range(t):
	(c, p, m) = map(int, input().split())
	if p * m >= c:
		print('1')
	elif p * m < c:
		print(math.ceil(c / (p * m)))


T = int(input())
for _ in range(T):
	(N, K, M) = map(int, input().split())
	if N % (K * M) == 0:
		print(N // (K * M))
	else:
		print(N // (K * M) + 1)


T = int(input())
for i in range(T):
	(n, k, m) = map(int, input().split())
	if n % m == 0:
		a = n / m / k
		b = round(a)
		if a > b:
			b = b + 1
			print(b)
		else:
			print(b)
	else:
		a = n / m / k
		b = round(a)
		if a > b:
			b = b + 1
			print(b)
		else:
			print(b)


t = int(input())
for i in range(t):
	(n, k, m) = map(int, input().split())
	bags = 0
	while n > 0:
		if n > k * m:
			bags += 1
			n -= k * m
		else:
			bags += 1
			break
	print(bags)


t = int(input())
for _ in range(t):
	(n, k, m) = map(int, input().split(' '))
	cambies = lambda n, k, m: n // (k * m) + 1 if n % (k * m) else n // (k * m)
	print(cambies(n, k, m))


import math
t = int(input())
for _ in range(t):
	(candies, pocket_per_bag, pocket_capacity) = map(int, input().split())
	print(math.ceil(candies / (pocket_capacity * pocket_per_bag)))


t = int(input())
for i in range(t):
	(x, y, z) = list(map(int, input().split()))
	c = y * z
	if x % c == 0:
		print(int(x / c))
	elif x % c != 0:
		print(int(x / c) + 1)


import math
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(int(math.ceil(a / (b * c))))


import math
t = int(input())
for i in range(t):
	(n, p, c) = map(int, input().split())
	print(math.ceil(n / (p * c)))


import math
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	z = b * c
	if b * c == a:
		print(1)
	else:
		print(math.ceil(a / z))


for t in range(int(input())):
	(n, k, m) = map(int, input().split())
	candies_left = n - k * m
	if n % (k * m) == 0:
		print(n // (k * m))
	else:
		print(n // (k * m) + 1)


from math import ceil
t = int(input())
for i in range(t):
	(candies, pockets, capacity) = map(int, input().split())
	bag = capacity * pockets
	print(ceil(candies / bag))


T = int(input())
import math as math
for T in range(0, T):
	(N, K, M) = input().split()
	N = int(N)
	K = int(K)
	M = int(M)
	need = math.ceil(N / (M * K))
	print(need)


import math

def candies(n, x, y):
	p = math.ceil(n / y)
	q = math.ceil(p / x)
	return q
t = int(input())
for i in range(t):
	(n, x, y) = map(int, input().split())
	v = candies(n, x, y)
	print(v)


t = int(input())
for _ in range(t):
	(n, k, m) = list(map(int, input().split()))
	capacity = k * m
	if n % capacity == 0:
		print(n // capacity)
	else:
		print(n // capacity + 1)


for i in range(int(input())):
	(n, k, m) = map(int, input().split())
	s = k * m
	if n <= s:
		print('1')
	elif n % s == 0:
		p = int(n / s)
		print(p)
	else:
		p = int(n / s) + 1
		print(p)


t = int(input())
for i in range(t):
	(X, P, Q) = map(int, input().split())
	B = P * Q
	K = X % B
	if K == 0:
		print(X // B)
	else:
		print(X // B + 1)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	x = b * c
	if a % x == 0:
		print(a // x)
	else:
		print(a // x + 1)


for a in range(int(input())):
	(n, k, m) = map(int, input().split())
	x = k * m
	y = n // x
	if n % x != 0:
		y = y + 1
	print(y)


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	if x % (y * z) == 0:
		print(int(x / (y * z)))
	else:
		print(int(x / (y * z) + 1))