Chef is fond of burgers and decided to make as many burgers as possible.

Chef has A patties and B buns. To make 1 burger, Chef needs 1 patty and 1 bun.  
Find the maximum number of burgers that Chef can make.

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

- The first line of input will contain an integer T — the number of test cases. The description of T test cases follows.
- The first and only line of each test case contains two space-separated integers A and B, the number of patties and buns respectively.

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

For each test case, output the maximum number of burgers that Chef can make. 

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

$1 ≤ T ≤ 1000$
$1 ≤ A, B ≤ 10^{5}$

----- Sample Input 1 ------ 
4
2 2
2 3
3 2
23 17
----- Sample Output 1 ------ 
2
2
2
17

----- explanation 1 ------ 
Test case $1$: Chef has $2$ patties and $2$ buns, and therefore Chef can make $2$ burgers.

Test case $2$: Chef has $2$ patties and $3$ buns. Chef can make at most $2$ burgers by using $2$ patties and $2$ buns.

Test case $3$: Chef has $3$ patties and $2$ buns. Chef can make at most $2$ burgers by using $2$ patties and $2$ buns.

Test case $4$: Chef has $23$ patties and $17$ buns. Chef can make at most $17$ burgers by using $17$ patties and $17$ buns.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for i in range(int(input())):
	(a, b) = [int(x) for x in input().split()]
	print(min(a, b))


T = int(input())
for Ti in range(T):
	[A, B] = map(int, input().split(' '))
	if A == B:
		print(A)
	else:
		print(min([A, B]))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a < b:
		print(a)
	else:
		print(b)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if a == b:
		print(a)
	else:
		print(min(a, b))


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


T = int(input())
for i in range(T):
	(a, b) = map(int, input().split(' '))
	if a < b:
		print(a)
	else:
		print(b)


T = int(input())
for i in range(T):
	(A, B) = map(int, input().split(' '))
	print(min(A, B))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(min(a, b))


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	max_burgers = min(a, b)
	print(max_burgers)


n = int(input())
for i in range(n):
	(p, q) = map(int, input().split())
	print(min(p, q))


T = int(input())
for i in range(T):
	(bun, patties) = map(int, input().split())
	if bun == patties or bun < patties:
		print(bun)
	elif bun > patties:
		print(patties)


t = int(input())
i = 0
while i < t:
	(a, b) = map(int, input().split())
	print(min(a, b))
	i = i + 1


T = int(input())
for i in range(T):
	p = input().split(' ')
	a = int(p[0])
	b = int(p[-1])
	print(min(a, b))


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if y < x:
		print(y)
	elif x == y:
		print(x)
	elif x < y:
		print(x)


T = int(input())
for i in range(T):
	(A, B) = map(int, input().split())
	if A < B:
		print(A)
	else:
		print(B)


T = int(input())
for i in range(T):
	(X, Y) = map(int, input().split())
	if X > Y:
		print(Y)
	else:
		print(X)


for _ in range(int(input())):
	(A, B) = map(int, input().split())
	c = min(A, B)
	print(c)


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


tc = int(input())
for i in range(tc):
	(x, y) = map(int, input().split())
	print(min(x, y))


n = int(input())
for n in range(0, n):
	(a, b) = map(int, input().split())
	if a < b:
		print(a)
	else:
		print(b)


t = int(input())
res = []
for i in range(t):
	inpt = [int(x) for x in input().split()]
	x = inpt[0]
	y = inpt[1]
	if x <= y:
		res.append(x)
	else:
		res.append(y)
for ele in res:
	print(ele)


t = int(input())
for i in range(t):
	(A, B) = map(int, input().split())
	result = min(A, B)
	print(result)


t = int(input())
while t > 0:
	l = list(map(int, input().split()))
	print(min(l))
	t = t - 1


for t in range(int(input())):
	(a, b) = map(int, input().split())
	if a == b:
		print(a)
	elif a > b:
		print(b)
	else:
		print(a)


t = int(input())

def burger(t):
	x = []
	for i in range(1, t + 1):
		a = list(map(int, input().split()))
		x.append(a)
	for num in x:
		if num[0] == num[1]:
			print(max(num))
		else:
			print(min(num))
burger(t)


T = int(input())
for _ in range(T):
	(A, B) = map(int, input().split())
	if A > B or B > A:
		print(min(A, B))
	else:
		print((A + B) // 2)


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


t = int(input())
while t >= 1:
	(a, b) = [int(x) for x in input().split()]
	print(a) if a <= b else print(b)
	t -= 1


s = int(input())
for i in range(s):
	(a, b) = list(map(int, input().split()))
	print(min(a, b))


test_cases = int(input())
for i in range(test_cases):
	stuff = list(map(int, input().split()))
	print(min(stuff))


x = int(input())
for i in range(x):
	(b, p) = map(int, input().split())
	print(min(b, p))


l = []
n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x < y:
		l.append(x)
	else:
		l.append(y)
print(*l, sep='\n')


burger = int(input())
for i in range(burger):
	(patties, buns) = map(int, input().split(' '))
	if patties > buns:
		print(buns)
	else:
		print(patties)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	print(min(a, b))


test = int(input())
ans = []
while test:
	test = test - 1
	(patties, buns) = [int(x) for x in input().split()]
	ans.append(min(patties, buns))
for i in ans:
	print(i)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a < b or a == b:
		print(a)
	else:
		print(b)


t = int(input())
for i in range(0, t):
	l = list(map(int, input().strip().split()))
	if l[0] < l[1]:
		print(l[0])
	else:
		print(l[1])


T = int(input())
for i in range(0, T):
	(A, B) = input().split()
	a = int(A)
	b = int(B)
	m = [a, b]
	if a - b == 0:
		print(a)
	else:
		print(min(m))


t = int(input())
for i in range(t):
	(X, Y) = map(int, input().split())
	print(min(X, Y))


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