Bessie has way too many friends because she is everyone's favorite cow! Her new friend Rabbit is trying to hop over so they can play! 

More specifically, he wants to get from $(0,0)$ to $(x,0)$ by making multiple hops. He is only willing to hop from one point to another point on the 2D plane if the Euclidean distance between the endpoints of a hop is one of its $n$ favorite numbers: $a_1, a_2, \ldots, a_n$. What is the minimum number of hops Rabbit needs to get from $(0,0)$ to $(x,0)$? Rabbit may land on points with non-integer coordinates. It can be proved that Rabbit can always reach his destination.

Recall that the Euclidean distance between points $(x_i, y_i)$ and $(x_j, y_j)$ is $\sqrt{(x_i-x_j)^2+(y_i-y_j)^2}$.

For example, if Rabbit has favorite numbers $1$ and $3$ he could hop from $(0,0)$ to $(4,0)$ in two hops as shown below. Note that there also exists other valid ways to hop to $(4,0)$ in $2$ hops (e.g. $(0,0)$ $\rightarrow$ $(2,-\sqrt{5})$ $\rightarrow$ $(4,0)$).

 $1$ Here is a graphic for the first example. Both hops have distance $3$, one of Rabbit's favorite numbers. 

In other words, each time Rabbit chooses some number $a_i$ and hops with distance equal to $a_i$ in any direction he wants. The same number can be used multiple times.


-----Input-----

The input consists of multiple test cases. The first line contains an integer $t$ ($1 \le t \le 1000$)  — the number of test cases. Next $2t$ lines contain test cases — two lines per test case.

The first line of each test case contains two integers $n$ and $x$ ($1 \le n \le 10^5$, $1 \le x \le 10^9$)  — the number of favorite numbers and the distance Rabbit wants to travel, respectively.

The second line of each test case contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 10^9$)  — Rabbit's favorite numbers. It is guaranteed that the favorite numbers are distinct.

It is guaranteed that the sum of $n$ over all the test cases will not exceed $10^5$.


-----Output-----

For each test case, print a single integer — the minimum number of hops needed.


-----Example-----
Input
4
2 4
1 3
3 12
3 4 5
1 5
5
2 10
15 4

Output
2
3
1
2



-----Note-----

The first test case of the sample is shown in the picture above. Rabbit can hop to $(2,\sqrt{5})$, then to $(4,0)$ for a total of two hops. Each hop has a distance of $3$, which is one of his favorite numbers.

In the second test case of the sample, one way for Rabbit to hop $3$ times is: $(0,0)$ $\rightarrow$ $(4,0)$ $\rightarrow$ $(8,0)$ $\rightarrow$ $(12,0)$.

In the third test case of the sample, Rabbit can hop from $(0,0)$ to $(5,0)$.

In the fourth test case of the sample, Rabbit can hop: $(0,0)$ $\rightarrow$ $(5,10\sqrt{2})$ $\rightarrow$ $(10,0)$.

Difficulty: EASY

Solutions:
for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	to = 0
	l = []
	t = 0
	l = list(map(int, input().split()))
	d = max(l)
	if b == d:
		to = 1
	elif d > b:
		to = 2
		for vaibhav in l:
			if vaibhav == b:
				to = 1
				break
	elif b % d == 0:
		to = b // d
	else:
		to = b // d + 1
	print(to)


t = int(input())
import math
for _ in range(t):
	(n, x) = map(int, input().split(' '))
	a = list(map(int, input().split(' ')))
	if x in a:
		print(1)
		continue
	ma = max(a)
	lj = x / ma
	if lj < 1:
		print(2)
		continue
	print(math.ceil(lj))


def find_max(list_of_numbers, length):
	if length < 0:
		return -1
	max = list_of_numbers[0]
	for i in range(1, length):
		if list_of_numbers[i] > max:
			max = list_of_numbers[i]
	return max
number_of_testcases = int(input())
for i in range(number_of_testcases):
	(n, x) = list(map(int, input().split()))
	numbers = list(map(int, input().split()))
	max = find_max(numbers, n)
	flag = 0
	for i in numbers:
		if x == i:
			print('1')
			flag = 1
			break
	if flag == 1:
		continue
	if x < max:
		print('2')
		continue
	if x > max:
		total_steps = x // max
		if x % max != 0:
			total_steps = total_steps + 1
		print(total_steps)


t = int(input())
(line1s, line2s) = ([], [])
for i in range(t):
	line1s.append(input())
	line2s.append(input())

def solve(line1, line2):
	(n, x) = map(int, line1.split())
	a = list(map(int, line2.split()))
	a.sort(reverse=True)
	if x in a:
		print(1)
	elif x < a[0]:
		print(2)
	elif x % a[0] == 0:
		print(x // a[0])
	else:
		print(x // a[0] + 1)
for i in range(t):
	solve(line1s[i], line2s[i])


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	m = max(l)
	if x in l:
		print(1)
	elif m > x:
		print(2)
	elif x % m == 0:
		print(x // m)
	else:
		print(x // m + 1)


import math
s = int(input(''))
while s > 0:
	(n, d) = input('').split()
	n = int(n)
	d = int(d)
	c = 0
	l = list(map(int, input('').split()))
	for i in l:
		if i == d:
			print(1)
			c = 1
			break
	if c == 0:
		print(max(2, math.ceil(d / max(l))))
	s = s - 1


from math import ceil
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = max(a)
	ans = 0
	if m <= x:
		ans = ceil(x / m)
	else:
		ans = 2
	for i in a:
		if i == x:
			ans = 1
	print(ans)


import math
T = int(input())
for _ in range(T):
	(n, x) = [int(i) for i in input().split()]
	hop = [int(i) for i in input().split()]
	zz = False
	for h in hop:
		if h == x:
			print(1)
			zz = True
	if zz:
		continue
	m = max(hop)
	if m > x:
		print(2)
	else:
		print(int(math.ceil(x / m)))


from math import *
te = int(input())
for y in range(te):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
		continue
	m = max(a)
	if x < m:
		print(2)
		continue
	else:
		print(ceil(x / m))


noh = lambda x, m: max(2, (x + m - 1) // m)
t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	al = list(map(int, input().split()))
	print(1 if x in al else noh(x, max(al)))


import math
a = int(input())
for i in range(0, a):
	arr = list(map(int, input().split()))
	brr = list(map(int, input().split()))
	brr.sort(reverse=True)
	count = 0
	plus = arr[1] - 2 * brr[0]
	if plus > 0:
		count = count + math.ceil(plus / brr[0])
	if arr[1] in brr:
		print(1)
	else:
		print(count + 2)


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	jumps = list(map(int, input().split()))
	if x in jumps:
		print(1)
	else:
		maxJump = max(jumps)
		res = int(max(2, math.ceil(x / maxJump)))
		print(res)


from math import ceil
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = set(map(int, input().split()))
	if x in arr:
		print(1)
	else:
		print(max(2, ceil(x / max(arr))))


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(N, X) = [int(x) for x in input().split()]
		A = [int(x) for x in input().split()]
		ma = max(A)
		if X in A:
			print(1)
			continue
		elif ma > X:
			print(2)
			continue
		else:
			print(-(-X // ma))
			continue
main()


import math as m
for _ in range(int(input())):
	(n, x) = list((int(i) for i in input().split()))
	A = list((int(i) for i in input().split()))
	if x in A:
		print(1)
	else:
		ans = max(2, m.ceil(x / max(A)))
		print(ans)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	(n, x) = rl()
	A = rl()
	m = 0
	bigger = False
	for a in A:
		if a == x:
			print(1)
			return
		elif a > x:
			bigger = True
		m = max(m, a)
	if bigger:
		print(2)
	elif x % m == 0:
		print(x // m)
	else:
		print(x // m + 1)
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = 0
	d = {}
	for i in a:
		d[i] = 1
		mx = max(mx, i)
	if d.get(x) != None:
		print(1)
		continue
	elif mx > x:
		print(2)
		continue
	y = math.ceil(x / mx)
	print(y)


t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	minm = 1000000000
	for i in range(n):
		if x % a[i] == 0:
			if x // a[i] < minm:
				minm = x // a[i]
		else:
			if a[i] < x:
				z = x // a[i] + 1
			elif a[i] > x:
				z = 2
			if z < minm:
				minm = z
	print(minm)


t = int(input())
for _i in range(t):
	(n, x) = map(int, input().split())
	arr = sorted(list(map(int, input().split())))
	if arr[n - 1] > x:
		ans = 2
		for i in arr:
			if i == x:
				ans = 1
				break
		print(ans)
	else:
		ans = x // arr[n - 1]
		if x % arr[n - 1]:
			ans += 1
		print(ans)


t = int(input())
for _ in range(t):
	(n, d) = [int(_) for _ in input().split()]
	a = [int(_) for _ in input().split()]
	step = max(a)
	res = 0
	for i in range(n):
		if d == a[i]:
			res = 1
	if res == 0:
		res = max(2, (d + step - 1) // step)
	print(res)


t = int(input())
for r in range(t):
	y = 0
	(n, x) = [int(i) for i in input().split()]
	a = list(map(int, input().split()))[:n]
	for i in range(n):
		if a[i] == x:
			y = 1
			print(1)
			break
	if y == 0:
		a.sort()
		if a[n - 1] > x:
			print(2)
		else:
			print((x + a[n - 1] - 1) // a[n - 1])


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = list(map(int, input().split()))[:n]
	if d in a:
		print(1)
	else:
		print(max(2, d // max(a) if d % max(a) == 0 else d // max(a) + 1))


import math
t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	f = 0
	if x in a:
		print('1')
	elif max(a) > x:
		print('2')
	elif sum(a) == x:
		print(n)
	elif x % max(a) == 0:
		print(x // max(a))
	else:
		print(int(x // max(a)) + 1)


for _ in range(int(input())):
	(n, x) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	if x in a:
		print(1)
	else:
		g = max(a)
		if g > x:
			print(2)
		else:
			print(int((x - 0.001) // g) + 1)


def solve():
	(n, d) = map(int, input().split())
	l = [*map(int, input().split())]
	dic = {}
	for i in range(n):
		dic[l[i]] = 1
	l.sort()
	maxi = max(l)
	if d <= maxi:
		for i in range(n):
			if d % l[i] == 0 and d == l[i]:
				print(1)
				return
		print(2)
		return
	if d % maxi == 0:
		print(d // maxi)
		return
	if d > maxi:
		ans = d // maxi
		ans -= 1
		print(ans + 2)
		return
for _ in range(int(input())):
	solve()


import math
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	m = -1
	eq = False
	for i in map(int, input().split()):
		if i == x:
			eq = True
		m = max(m, i)
	if eq:
		print(1)
		continue
	if m > x:
		print(2)
		continue
	print(math.ceil(x / m))


def solve():
	(n, x) = [int(s) for s in input().strip().split()]
	A = [int(s) for s in input().strip().split()]
	if x in A:
		print(1)
		return
	maxx = max(A)
	result = max((x + maxx - 1) // maxx, 2)
	print(result)

def main():
	for _ in range(int(input().strip())):
		solve()
main()


from collections import defaultdict as dd
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	d = dd(int)
	for i in a:
		d[i] = 1
	fx1 = a[0]
	f1 = 0
	for i in a:
		if i <= x:
			fx1 = i
		else:
			f1 = 1
	flag = 0
	for i in a:
		if x % i == 0:
			fx = i
			flag = 1
	if d[x]:
		print(1)
	elif f1 == 1:
		print(2)
	elif flag == 0:
		if fx1 < x:
			print(x // fx1 + 1)
		else:
			print(2)
	elif flag == 1:
		if fx1 < x:
			print(min(x // fx, x // fx1 + 1))
		else:
			print(min(x // fx, 2))


T = int(input())
while T != 0:
	T -= 1
	a = input().split()
	n = int(a[0])
	m = int(a[1])
	d = input().split()
	maxn = 0
	ok = 0
	for i in range(0, n):
		d[i] = int(d[i])
		if d[i] == m:
			ok = 1
			print(1)
			break
		if d[i] > maxn:
			maxn = d[i]
	if ok == 1:
		continue
	ans = int(m // maxn)
	re = m % maxn
	if re == 0:
		print(ans)
		continue
	if ans != 0:
		print(ans + 1)
	else:
		print(ans + 2)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mn = float('inf')
	d = {}
	for i in a:
		d[i] = 1
	for i in a:
		cs = x // i
		rem = x % i
		if cs == 0:
			cs = 2
		elif rem != 0:
			cs += 1
		mn = min(mn, cs)
	print(mn)


from os import path
import sys
from math import ceil, floor, gcd, log2
from collections import defaultdict, Counter
maxx = float('inf')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
	I = lambda : int(sys.stdin.buffer.readline())
	tup = lambda : map(int, sys.stdin.buffer.readline().split())
	lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
	S = lambda : sys.stdin.readline().replace('\n', '').strip()
	stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
	star = lambda x: print(' '.join(map(str, x)))
else:
	I = lambda : int(sys.stdin.buffer.readline())
	tup = lambda : map(int, sys.stdin.buffer.readline().split())
	lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
	S = lambda : sys.stdin.readline().replace('\n', '').strip()
	stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
	star = lambda x: print(' '.join(map(str, x)))
for _ in range(I()):
	(n, x) = tup()
	ls = lint()
	if x in ls:
		print(1)
		continue
	mi = min(map(lambda i: ceil(x / i), ls))
	print(max(2, mi))


for _ in range(int(input())):
	(n, x) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	ans = []
	for i in arr:
		if x % i == 0:
			ans.append(x // i)
		else:
			rem = x % i
			t = x - i - rem
			if t < 0:
				t = 0
			ans.append(t // i + 2)
	print(min(ans))


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	arr = list(map(int, input().split()))
	if d in arr:
		print(1)
	else:
		print(max(2, math.ceil(d / max(arr))))


from math import ceil, sqrt, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())

def divisor(n):
	b = []
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				b.append(i)
			else:
				b.append(i)
				b.append(n // i)
	return b
t = ii()
while t:
	t -= 1
	(n, x) = mi()
	a = li()
	if x in a:
		print('1')
		continue
	a1 = max(a)
	a1 *= a1
	if x * x < a1:
		print('2')
		continue
	a2 = max(a)
	y = x // a2
	if x % a2:
		print(y + 1)
	else:
		print(y)


import sys
import math

def fast_input():
	return sys.stdin.readline().strip()

def data_input():
	return [int(x) for x in fast_input().split()]

def binary_search(array, x):
	(left, right) = (-1, len(array))
	while left + 1 != right:
		middle = (left + right) // 2
		if array[middle] >= x:
			right = middle
		elif array[middle] < x:
			left = middle
	return right

def solve_of_problem():
	(n, x) = data_input()
	data = sorted(data_input())
	if data[min(n - 1, binary_search(data, x))] == x:
		print(1)
	elif data[-1] > x:
		print(2)
	elif x % data[-1] == 0:
		print(x // data[-1])
	else:
		print((x + data[-1] - 1) // data[-1])
	return
for ______ in range(int(fast_input())):
	solve_of_problem()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	from math import ceil
	values = list(map(int, input().split()))
	numfavs = values[0]
	distance = values[1]
	favnums = list(map(int, input().split()))
	if distance in favnums:
		print(1)
	else:
		maximum = max(favnums)
		if maximum < distance:
			print(ceil(distance / maximum))
		else:
			print(2)


for i in range(int(input())):
	a = [int(x) for x in input().split()][1]
	s = [int(x) for x in input().split()]
	m = max(s)
	if a in s:
		print(1)
	else:
		print(max(2, (a - 1) // m + 1))


def binarySearch(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return 1
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return 0
for i in range(0, int(input())):
	(n, x) = list(map(int, input().split()))
	a = sorted(list(map(int, input().split())))
	if binarySearch(a, 0, n - 1, x):
		print(1)
		continue
	if a[-1] > x:
		print(2)
	elif x % a[-1] == 0:
		print(x // a[-1])
	else:
		print(x // a[-1] + 1)


import math
import sys
t = int(input())
for i in range(0, t):
	inp = input().split()
	n = int(inp[0])
	x = int(inp[1])
	fav_no = [int(x) for x in input().split()]
	fav_no.sort(reverse=True)
	min = sys.maxsize
	for i in fav_no:
		if x >= i:
			current = math.ceil(x / i)
		else:
			current = 2
		if current <= min:
			min = current
		else:
			break
	print(min)


def solve(n, x, arr):
	ceiling = lambda a, b: a // b + (a % b != 0)
	if x in arr:
		print(1)
		return
	mx = max(arr)
	print(max(2, ceiling(x, mx)))

def main():
	tc = int(input())
	inp = lambda : [int(x) for x in input().split()]
	for _ in range(tc):
		(n, x) = inp()
		arr = inp()
		solve(n, x, arr)
main()


q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split())
	ints = [int(x) for x in input().split()]
	ints.sort(reverse=True)
	if ints[0] > x and (not x in ints):
		print(2)
	elif x % ints[0] == 0:
		print(x // ints[0])
	else:
		print(x // ints[0] + 1)


a = int(input())
for i in range(a):
	(n, d) = map(int, input().split())
	m = list(map(int, input().split()))
	ui = 10000000000.0
	for l in m:
		ans = 0
		if d % l != 0:
			ans += 1
		ans += d // l
		if d // l == 0 and d % l != 0:
			ans += 1
		ui = min(ui, ans)
	print(int(ui))


from sys import stdin, stdout
t = int(stdin.readline().strip())
for _ in range(t):
	(n, x) = map(int, stdin.readline().split())
	alist = set(map(int, stdin.readline().split()))
	mx = 0
	cnt = x + x
	for a in alist:
		mx = max(a, mx)
		if x % a == 0:
			cnt = min(x // a, cnt)
	c = max(0, x // mx - 1)
	x -= c * mx
	if x in alist:
		c += 1
	else:
		c += 2
	cnt = min(c, cnt)
	stdout.write('{}\n'.format(cnt))


import sys
input = sys.stdin.readline
Q = int(input())
Query = []
for _ in range(Q):
	(N, K) = map(int, input().split())
	A = list(map(int, input().split()))
	Query.append((N, K, A))
for (N, K, A) in Query:
	a = max(A)
	b = min(A)
	if K in set(A):
		ans = 1
	elif a < K:
		ans = (K + a - 1) // a
	else:
		ans = 2
	print(ans)


q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split(' '))
	c = [int(x) for x in input().split(' ')]
	c.sort()
	if x in c:
		print(1)
	elif x % c[-1] == 0:
		print(x // c[-1])
	else:
		print(max(1, x // c[-1]) + 1)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = set((int(i) for i in input().split()))
	MAX = max(a)
	if x in a:
		print(1)
	elif MAX > x or MAX * 2 >= x:
		print(2)
	else:
		r = x % MAX
		if r == 0:
			print(x // MAX)
			continue
		if r in a:
			print(x // MAX + 1)
			continue
		FOUND = False
		r += MAX
		for el in a:
			if r - el in a:
				FOUND = True
				break
		if FOUND:
			print(x // MAX - 1 + 2)
		else:
			print(x // MAX + 1)


from math import ceil, floor
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	s = sum(a)
	m = max(a)
	if x in a:
		print(1)
	else:
		ans = ceil(x / m)
		print(max(2, ans))


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	m = max(l)
	if x in l:
		print(1)
	else:
		d = max(2, math.ceil(x / m))
		print(d)


import math
n = int(input())
Result = []
for i in range(0, n):
	Found = False
	Line_1 = list(map(int, input().strip().split()))[0:2]
	Fav_list_len = Line_1[0]
	Distance = Line_1[1]
	Fav_list = list(map(int, input().strip().split()))[0:Fav_list_len]
	Fav_list.sort(reverse=True)
	for i in Fav_list:
		if i == Distance:
			Result.append(1)
			Found = True
	if Found == False:
		if Fav_list[0] > Distance:
			Result.append(2)
		else:
			Result.append(math.ceil(Distance / Fav_list[0]))
for i in Result:
	print(i)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	numbers = set(map(int, input().split()))
	if x in numbers:
		print(1)
		continue
	k = max(numbers)
	if k >= x:
		print(2)
		continue
	print(int(ceil(x / k)))


import sys
from pprint import pprint
if not 'DEBUG' in globals():
	readline = sys.stdin.readline

def read(map_func):
	return map_func(readline().rstrip())

def reads(map_func):
	return list(map(map_func, readline().rstrip().split()))

def readn(map_func, n):
	return [map_func(readline().rstrip()) for _ in range(n)]

def readint():
	return read(int)

def readints():
	return reads(int)

def readcol(n):
	return readn(int, n)

def readmat(n):
	return [readints() for _ in range(n)]

def readmap(n):
	return readn(list, n)

def makemat(n, m, v):
	return [[v] * m for _ in range(n)]

def zeromat(n, m=None):
	return makemat(n, m if m else n, 0)

def listmat(n, m=None):
	return [[[] for _ in range(m if m else n)] for _ in range(n)]

def crosslist(y, x, n=None, m=None):
	return [(p, q) for (p, q) in [(y, x + 1), (y - 1, x), (y, x - 1), (y + 1, x)] if (n == None or 0 <= p < n) and (m == None or 0 <= q < m)]

def roundlist(y, x, n=None, m=None):
	return [(p, q) for (p, q) in [(y, x + 1), (y - 1, x + 1), (y - 1, x), (y - 1, x - 1), (y, x - 1), (y + 1, x - 1), (y + 1, x), (y + 1, x + 1)] if (n == None or 0 <= p < n) and (m == None or 0 <= q < m)]

def plog(obj):
	pprint(obj) if 'DEBUG' in globals() else None

def log(msg, label=None):
	print((label + ': ' if label else '') + str(msg)) if 'DEBUG' in globals() else None

def _logmat(mat, label=None):
	fmt = '{:' + str(max((max((len(str(s)) for s in m)) for m in mat))) + 'd}'
	f = lambda row: '[' + ' '.join((fmt.format(x) for x in row)) + ']'
	[log('[' + f(row), label) if i == 0 else log((' ' * (len(label) + 3) if label else ' ') + f(row) + ']', None) if i == len(mat) - 1 else log((' ' * (len(label) + 3) if label else ' ') + f(row), None) for (i, row) in enumerate(mat)]

def logmat(mat, label=None):
	_logmat(mat, label) if 'DEBUG' in globals() else None
for _ in range(readint()):
	(N, X) = readints()
	A = readints()
	m = max(A)
	if X in A:
		print(1)
	elif m > X:
		print(2)
	else:
		(t, r) = divmod(X, m)
		if r == 0:
			print(t)
		else:
			print(t + 1)


import math
for _ in ' ' * int(input()):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = max(a)
	print(1 if x in a else 2 if mx > x else math.ceil(x / mx))


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = [int(j) for j in input().split()]
	jump = max(a)
	if x >= jump:
		if x % jump == 0:
			print(x // jump)
		else:
			print(max(2, x // jump + 1))
	else:
		jumped = False
		for small in a:
			if x == small:
				print(1)
				jumped = True
				break
		if not jumped:
			print(2)


def solve():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = max(a)
	if mx > x:
		if x in a:
			print(1)
		else:
			print(2)
		return
	print((x + mx - 1) // mx)
	return
tests = int(input())
for _ in range(tests):
	solve()


T = int(input())
for t in range(T):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		ans = (x + max(a) - 1) // max(a)
		if ans == 1:
			ans = 2
		print(ans)


from math import ceil
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	p = list(map(int, input().split()))
	l = []
	if d in p:
		print(1)
		continue
	for i in p:
		l.append(ceil(d / i))
	if d < max(p):
		print(min(l) + 1)
	else:
		print(min(l))


t = int(input())
for q in range(0, t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	d = max(a)
	ans = 0
	if x > 2 * d:
		ans += (x - 2 * d) // d
		if (x - 2 * d) % d != 0:
			ans += 1
	y = ans * d
	flag = True
	for i in range(0, n):
		if a[i] == x - y:
			flag = False
			ans += 1
			break
	if flag:
		ans += 2
	print(ans)


import math
t = int(input())
for i in range(t):
	(n, X) = map(int, input().split())
	a = list(map(int, input().split()))
	if X in a:
		print('1')
	else:
		print(max(2, math.ceil(X / max(a))))


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	step = max(a)
	(ans, rem) = divmod(x, step)
	if rem == 0:
		print(ans)
	elif ans == 0:
		if x in a:
			print(1)
		else:
			print(2)
	else:
		print(ans + 1)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print('1')
	elif max(a) > x:
		print('2')
	else:
		k = max(a)
		if x % k == 0:
			print(x // k)
		else:
			print(x // k + 1)


import math, sys
for _ in range(int(sys.stdin.readline())):
	(n, x) = map(int, input().split())
	ints = [int(x) for x in input().split()]
	max1 = max(ints)
	if max1 > x and (not x in ints):
		sys.stdout.write('2\n')
	else:
		sys.stdout.write(str(math.ceil(x / max1)) + '\n')


p = int(input())
for j in range(p):
	(n, x) = map(int, input().split())
	s = set()
	num = 0
	for i in input().split():
		s.add(int(i))
	m = max(s)
	if x in s:
		print(1)
	else:
		if x % m == 0:
			num += x // m
		else:
			if x // m < 1:
				k = 1
			else:
				k = x // m
			num += k + 1
		print(num)


t = int(input())
for _ in range(t):
	(n, x) = [int(p) for p in input().split()]
	arr = sorted([int(p) for p in input().split()], reverse=True)
	steps = 1
	if x in arr:
		print(1)
		continue
	m = arr[0]
	if m > 2 * x:
		print(2)
	elif x >= m:
		if x % m == 0:
			print(x // m)
		else:
			print(x // m + 1)
	else:
		print(2)


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.count(x):
		print(1)
	else:
		q = max(a)
		print(max(2, int((x + q - 1) / q)))


def search(a, e):
	l = 0
	r = len(a) - 1
	x = (l + r) // 2
	while r - l > 1:
		if a[x] <= e:
			l = x
		else:
			r = x
		x = (l + r) // 2
	if len(a) == 1:
		return a[0] == e
	else:
		return a[x] == e or a[x + 1] == e
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	if search(a, x):
		print(1)
	else:
		m = max(a)
		print(max(2, x // m + (x % m != 0)))


T = int(input())

def solve():
	(n, x) = input().split()
	n = int(n)
	x = int(x)
	a = input().split()
	for i in range(len(a)):
		a[i] = int(a[i])
	mx = int(max(a))
	if x < mx:
		ok = 0
		for i in a:
			if i == x:
				ok = 1
		if ok == 1:
			print(1)
		else:
			print(2)
	else:
		print(x // mx + (1 if x % mx else 0))
while T:
	solve()
	T -= 1


test = int(input())
for i in range(test):
	fav_and_distance = list(map(int, input().strip().split()))
	fav_numbers = list(map(int, input().strip().split()))
	hop_numbers = []
	distance = fav_and_distance[1]
	for number in fav_numbers:
		if distance % number == 0:
			hop = distance / number
			hop_numbers.append(hop)
		elif number > distance:
			hop_numbers.append(2)
		else:
			division = distance // number
			hop_numbers.append(division + 1)
	print(int(min(hop_numbers)))


q = int(input())
for u in range(q):
	(n, x) = [int(i) for i in input().split()]
	s = [int(i) for i in input().split()]
	s.sort()
	if x % s[-1] != 0:
		if x > s[-1]:
			print((x - s[-1]) // s[-1] + 2)
		elif x not in s:
			print(2)
		else:
			print(1)
	else:
		print(x // s[-1])


def solve():
	case = int(input())
	for _t in range(case):
		(n, x) = map(int, input().split())
		li = list(map(int, input().split()))
		step = max(li)
		ans = int(x / step) + int(x % step != 0) + int(x < step)
		for i in range(n):
			if li[i] == x:
				ans = 1
				break
		print(ans)
solve()


import math
R = lambda : map(int, input().split())
t = int(input())

def solve(n, x, a):
	for i in a:
		if i == x:
			print('1')
			return
	a = max(a)
	if x % a == 0:
		print(x // a)
	else:
		ans = 2
		x -= 2 * a
		if x > 0:
			ans += math.ceil(x / a)
		print(ans)
for _ in range(t):
	(n, x) = R()
	a = list(R())
	solve(n, x, a)


def main(t):
	while t:
		(_, distance) = map(int, input().split())
		numbers = list(map(int, input().split()))
		if distance in numbers:
			print('1')
			t -= 1
			continue
		max_val = max(numbers)
		if distance < max_val:
			print('2')
			t -= 1
			continue
		step = distance // max_val
		if distance % max_val:
			step += 1
		print(step)
		t -= 1
	return
trials = int(input())
main(trials)


import sys
for _ in range(int(sys.stdin.readline().rstrip())):
	(n, x) = list(map(int, sys.stdin.readline().rstrip().split()))
	num = list(map(int, sys.stdin.readline().rstrip().split()))
	num.sort()
	if x in num:
		print(1)
		continue
	elif num[-1:][0] * 2 >= x:
		print(2)
		continue
	else:
		chk = x - num[-1:][0] * 2
		re = int(chk / num[-1:][0]) + 2
		if chk % num[-1:][0] != 0:
			re += 1
		print(re)


t = int(input())
for i in range(t):
	sy = 0
	(n, d) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	m = max(a)
	if d in a:
		sy = 1
	elif d < m:
		sy = 2
	else:
		sy += d // m
		v = d % m
		if v > 0:
			sy += 1
	print(sy)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		m = max(a)
		print(max(2, ceil(x / m)))


import math
for _ in range(int(input())):
	(n, x) = list(map(int, input().strip().split()))
	array = list(map(int, input().strip().split()))
	k = max(array)
	if x in array:
		print(1)
	elif k >= x / 2:
		print(2)
	else:
		print(int(math.ceil(x / k)))


t = int(input())
for case_num in range(t):
	(n, x) = map(int, input().split(' '))
	a = list(map(int, input().split(' ')))
	b = 0
	for i in a:
		if x % i == 0:
			b = max(b, i)
	c = max(a)
	ans = 10000000000.0 if b == 0 else x // b
	ans = min(ans, 1 + max(1, x // c))
	print(ans)


num_t = int(input())
for _ in range(num_t):
	(n, x) = map(int, input().split())
	arr = [int(i) for i in input().split()]
	arr.sort(reverse=True)
	if arr[0] <= x:
		print((x + arr[0] - 1) // arr[0])
	else:
		print(1 if x in arr else 2)


import sys
from math import *
input = sys.stdin.readline
d = {}
t = int(input())
while t > 0:
	t -= 1
	(n, d) = map(int, input().split())
	a = [int(x) for x in input().split()]
	if d in a:
		print(1)
		continue
	print(max(2, int(ceil(d / max(a)))))


from math import ceil

def count_min_hops_num(distance, numbers):
	if distance in numbers:
		return 1
	max_num = max(numbers)
	c = ceil(distance / max_num)
	return max(c, 2)
t = int(input())
for i in range(t):
	distance = list(map(lambda x: int(x), input().split()))[1]
	numbers = list(map(lambda x: int(x), input().split()))
	print(count_min_hops_num(distance, numbers))


inputNum = int(input())
ansList = []
for i in range(inputNum):
	(favNum, distance) = map(int, input().split())
	favList = [int(n) for n in input().split()]
	favList.sort()
	favList.reverse()
	for j in favList:
		ans = int(distance / j)
		if ans == 0:
			ans += 1
		if distance % j != 0:
			ans += 1
		if favList.count(distance):
			ans = 1
		ansList.append(ans)
		break
for i in ansList:
	print(i)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		m = max(a)
		print(max(2, (x - 1) // m + 1))


t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	mx = max(l)
	ans = 0
	if x in l:
		print(1)
	elif mx > x:
		print(2)
	else:
		ct = x // mx
		if x % mx != 0:
			ct += 1
		print(ct)


for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		b = max(a)
		if b > x:
			print(2)
		else:
			c = x / b
			if c == int(c):
				print(int(c))
			elif c <= 2:
				print(2)
			else:
				print(int(c) + 1)


from math import *
zzz = int(input())
for zz in range(zzz):
	(n, x) = map(int, input().split())
	a = [int(i) for i in input().split()]
	a.sort()
	if x in a:
		print(1)
	elif x <= a[-1] * 2:
		print(2)
	else:
		i = n - 1
		while a[i] > x:
			i -= 1
		print(int(ceil(x / a[i])))


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	ar = list(map(int, input().split()))
	y1 = max(ar)
	if x in ar:
		print(1)
	elif x % y1 == 0:
		print(x // y1)
	elif x // y1 == 0:
		print(2)
	else:
		print(x // y1 + 1)


t = int(input())
answer = []
for iteration in range(t):
	(n, x) = [int(element) for element in input().split(' ')]
	favorite = [int(element) for element in input().split(' ')]
	if x in favorite:
		answer.append(str(1))
	elif x % max(favorite) == 0:
		answer.append(str(max(x // max(favorite), 2)))
	else:
		answer.append(str(max(x // max(favorite) + 1, 2)))
print('\n'.join(answer))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, x) = [int(item) for item in input().split()]
	a = [int(item) for item in input().split()]
	max_a = max(a)
	ans = (x + max_a - 1) // max_a
	if ans == 1 and x not in a:
		ans = 2
	print(ans)


import math
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	l = [int(x) for x in input().split()]
	x = max(l)
	if x <= m:
		print(math.ceil(m / x))
	else:
		c = 0
		for i in range(n):
			if l[i] == m:
				c = 1
		if c == 0:
			print(2)
		else:
			print(1)


q = int(input())
while q:
	(n, x) = input().split()
	(n, x) = (int(n), int(x))
	l = [int(i) for i in input().split()]
	if x in l:
		print(1)
	else:
		mx = max(l)
		print(max(2, (x + mx - 1) // mx))
	q -= 1


from sys import stdin, stdout
t = 1

def lint():
	return list(map(int, input().split()))
t = int(input())
for i in range(t):
	(n, x) = lint()
	a = lint()
	if x in a:
		print('1')
		continue
	m = max(a)
	print(max(2, (x - 1) // m + 1))


from math import ceil
for bipki in range(int(input())):
	(n, x) = map(int, input().split())
	A = set(map(int, input().split()))
	y = max(A)
	if x in A:
		print(1)
	else:
		print(max(2, ceil(x / y)))


import math
t = int(input())
while t != 0:
	(n, d) = map(int, input().split())
	a = [int(x) for x in input().split()]
	if d in a:
		print(1)
	else:
		x = max(a)
		print(max(2, (d + x - 1) // x))
	t -= 1


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(n, k) = In()
		l = list(In())
		l.sort()
		pos = find_gt(l, k)
		if pos != -1:
			if l[pos] == k:
				print(1)
			else:
				print(2)
		else:
			ans = 10000000000.0
			for x in l:
				temp = k // x
				z = k - temp * x
				if k % x == 0:
					ans = min(ans, k // x)
					continue
				pos = find_gt(l, z)
				if pos != -1:
					if l[pos] == k - temp * x:
						temp += 1
					elif z <= x * int(2 ** 0.5):
						temp += 1
					else:
						temp += 1
					ans = min(ans, temp)
				else:
					temp += 2
					ans = min(ans, temp)
			print(ans)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


import sys
from math import ceil
input = sys.stdin.readline
for _ in range(int(input().strip())):
	(n, k) = list(map(int, input().strip().split()))
	arr = list(map(int, input().strip().split()))
	ma = max(arr)
	if ma == k or k in arr:
		print(1)
	elif ma > k:
		print(2)
	else:
		print(ceil(k / ma))


in1 = int(input())
for _ in range(in1):
	(n, x) = map(int, input().split())
	a = []
	a = list(map(int, input().split()))
	ans = 2147483647
	for i in range(len(a)):
		temp = 2
		if a[i] <= x:
			temp = int(x / a[i])
			if x % a[i] > 0:
				temp += 1
		ans = min(ans, temp)
	print(ans)


from math import ceil
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	mini = int(1000000000.0)
	for x in map(int, input().split()):
		z = ceil(b / x)
		if x <= b:
			mini = z if mini > z else mini
		else:
			mini = 2 if mini > 2 else mini
	print(mini)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	jumps = set(map(int, input().split()))
	if x in jumps:
		print(1)
		continue
	jumpmax = max(jumps)
	if jumpmax > x:
		print(2)
	else:
		print(ceil(x / jumpmax))


n = int(input())
for _ in range(n):
	(kk, m) = map(int, input().split())
	nums = list(map(int, input().split()))
	if m in nums:
		print(1)
		continue
	maxx = max(nums)
	(a, b) = divmod(m, maxx)
	ap = 0
	if b:
		ap += 1
	if a == 0:
		ap += 1
	print(a + ap)


def max_hay(d, a):
	a.sort(reverse=True)
	if d in a:
		return 1
	elif a[0] > d:
		return 2
	else:
		return (d + a[0] - 1) // a[0]
num = int(input())
for _ in range(num):
	(n, d) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	print(max_hay(d, a))


from math import factorial
from collections import Counter
from heapq import heapify, heappop, heappush
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 1000000007
INF = float('inf')
from math import ceil

def main():
	N = int(input())
	for _ in range(N):
		(n, x) = RL()
		arr = list(RL())
		ma = max(arr)
		res = ceil(x / ma)
		if ma > x:
			if x in arr:
				print(1)
			else:
				print(2)
		else:
			print(res)
main()


import math
for i in range(int(input())):
	(x, y) = map(int, input().split())
	l = list(map(int, input().split()))
	k = l
	l = max(l)
	if y in k:
		print(1)
	elif y < l:
		print(2)
	else:
		print(int(math.ceil(y / l)))


t = int(input())

def divup(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1
for T in range(t):
	(n, x) = [int(i) for i in input().split(' ')]
	a = [int(i) for i in input().split(' ')]
	if x in a:
		print(1)
		continue
	if max(a) >= divup(x, 2):
		print(2)
		continue
	else:
		print(divup(x, max(a)))


import math
t = int(input())
while t:
	t -= 1
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	mn = 1000000000
	for i in range(n):
		if a[i] < x:
			k = math.ceil(x / a[i])
		elif a[i] == x:
			k = 1
		else:
			k = 2
		mn = min(mn, k)
	print(mn)


import math
t = int(input())
for _i in range(t):
	(n, m) = map(int, input().split())
	s = list(map(int, input().split()))
	flag = False
	for j in range(n):
		if s[j] == m:
			print(1)
			flag = True
			break
	if flag == False:
		maxx = max(s)
		print(max(2, math.ceil(m / maxx)))


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	elif max(a) >= x / 2:
		print(2)
	else:
		print(math.ceil(x / max(a)))


from math import ceil
t = int(input())
for _ in range(t):
	(n_nums, dist) = [int(i) for i in input().split()]
	nums = [int(i) for i in input().split()]
	num = max(nums)
	if num > dist and dist not in nums:
		print(2)
	else:
		print(ceil(dist / num))


t = int(input())
while t > 0:
	p = [int(no) for no in input().split()]
	n = p[0]
	d = p[1]
	a = [int(no) for no in input().split()]
	max1 = -1
	ans = -1
	for i in range(0, n):
		if a[i] > max1:
			max1 = a[i]
	if max1 > d:
		ans = 2
	for i in range(0, n):
		if a[i] == d:
			ans = 1
			break
	if ans == -1:
		ans = (d + max1 - 1) / max1
	print(int(ans))
	t = t - 1


for _ in range(int(input())):
	(n, x) = list(map(int, input().split()))
	ar = list(map(int, input().split()))
	num = (x + max(ar) - 1) // max(ar)
	if num == 1 and x not in ar:
		num = 2
	print(num)


from sys import stdin
from math import ceil

def func(arr, x):
	if x in arr:
		return 1
	return max(2, ceil(x / max(arr)))
for _ in range(int(stdin.readline())):
	(n, x) = map(int, stdin.readline().split())
	arr = list(map(int, stdin.readline().split()))
	print(func(arr, x))


d = int(input())
while d:
	(a, x) = map(int, input().split())
	l = list(map(int, input().split()))
	c = max(l)
	t = 0
	for i in l:
		if i == x:
			t += 1
	if t == 1:
		print(1)
	elif c < x and c >= x / 2:
		print(2)
	elif c > x:
		print(2)
	elif x / c == x // c:
		print(x // c)
	else:
		print(x // c + 1)
	d -= 1


t = int(input())
from math import ceil
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	if x in arr:
		print(1)
		continue
	mx = max(arr)
	ans = max(ceil(x / mx), 2)
	print(ans)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	t = 0
	for i in a:
		if i == x:
			t = 1
			break
	if t:
		print(t)
	else:
		m = max(a)
		if m > x:
			print(2)
		else:
			print(x // m + min(x % m, 1))


t = int(input())
while t > 0:
	b = [int(x) for x in input().split()]
	n = b[0]
	k = b[1]
	a = [int(x) for x in input().split()]
	m = max(a)
	if k % m == 0:
		print(k // m)
	elif k in a:
		print(1)
	elif m > k:
		print(2)
	else:
		print(k // m + 1)
	t -= 1


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	mod = 998244353
	for _ in range(ri()):
		(n, x) = ria()
		a = ria()
		z = max(a)
		if z > x:
			t = 0
			for i in a:
				if i == x:
					wi(1)
					t = 1
					break
			if t == 0:
				wi(2)
		else:
			wi(math.ceil(x / z))
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


from collections import defaultdict
from sys import stdin
import math
input = stdin.readline
t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		print(max(2, math.ceil(x / max(a))))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	it = list(map(int, input().split()))
	tt = set(it)
	tot = 0
	xx = x
	y = max(it)
	tot = xx // y
	yy = xx % y
	if x in it:
		print(1)
		continue
	if y > x:
		print(2)
		continue
	if yy == 0:
		print(tot)
		continue
	tot += 1
	print(tot)


from math import ceil
for saquif in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	y = 1
	for i in a:
		if i == x:
			rslt = 1
			y = 0
			break
	if y and max(a) < x:
		rslt = ceil(x / max(a))
	elif y and max(a) > x:
		rslt = 2
	print(rslt)


def ceil(a, b):
	return -(-a // b)
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	al = list(map(int, input().split()))
	if x in al:
		print(1)
		continue
	almax = max(al)
	k = ceil(x, almax)
	print(max(k, 2))


from math import ceil
for _ in range(int(input())):
	(f, d) = map(int, input().split())
	n = set(map(int, input().split()))
	if d in n:
		print(1)
	else:
		print(max(2, ceil(d / max(n))))


import sys
queries = int(sys.stdin.readline())

def minJumps(x):
	numbers = sys.stdin.readline().strip().split()
	numbers = [int(num) for num in numbers]
	if x in numbers:
		return 1
	else:
		numbers.sort()
		answer = x // numbers[-1]
		if answer == 0:
			return 2
		elif x % numbers[-1] == 0:
			return answer
		else:
			return answer + 1
for query in range(queries):
	(numbers, x) = map(int, sys.stdin.readline().strip().split())
	print(minJumps(x))


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	lis = map(int, input().split())
	lis = sorted(lis)
	if x in lis:
		print(1)
		continue
	print(max([(x + lis[-1] - 1) // lis[-1], 2]))


N = 1000000005
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = N
	for i in a:
		if i == d:
			ans = 1
			break
		else:
			y = d // i
			if d % i:
				y += 1
			y = max(2, y)
			if y < ans:
				ans = y
	print(ans)


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n, x) = I()
	a = I()
	if x in a:
		print(1)
		continue
	print(max(2, ceil(x / max(a))))


T = int(input())
for t in range(T):
	(n, x) = list(map(int, input().split()))
	nList = list(map(int, input().split()))
	nList.sort(reverse=True)
	N = nList[0]
	if x in nList:
		print(1)
	elif x % N == 0:
		print(x // N)
	elif x < 2 * N:
		print(2)
	else:
		print((x - 2 * N) // N + 3)


def main():
	from sys import stdin, stdout
	for _ in range(int(stdin.readline())):
		(n, x) = list(map(int, stdin.readline().split()))
		a = set(map(int, stdin.readline().split()))
		max_a = max(a)
		ans = (x - 1) // max_a + 1
		if ans == 1 and x not in a:
			ans = 2
		print(ans)
main()


q = int(input())
for i in range(q):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	if x in a:
		print(1)
	elif a[0] > x:
		print(2)
	elif x % a[0] == 0:
		print(x // a[0])
	else:
		print(x // a[0] + 1)


t = int(input())
for i in range(t):
	r = [int(x) for x in input().split()]
	s = [int(x) for x in input().split()]
	pos = False
	for h in range(r[0]):
		if r[1] == s[h]:
			pos = True
	if pos == True:
		print(1)
	else:
		print(max(2, (r[1] - 1) // max(s) + 1))


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = []
	for i in map(int, input().split()):
		if i == x:
			l.append(1)
		elif i > x:
			l.append(2)
		else:
			l.append(math.ceil(x / i))
	l.sort()
	print(l[0])


T = int(input())
for t in range(T):
	(n, x) = [int(i) for i in input().split()]
	A = set([int(i) for i in input().split()])
	if x in A:
		print(1)
	else:
		y = max(A)
		print(max(2, (x + y - 1) // y))


def f():
	t = int(input())
	for _ in range(t):
		_input = input()
		n = int(_input.split(' ')[0])
		x = int(_input.split(' ')[1])
		a = list(map(int, input().split(' ')))
		b = max(a)
		if x in a:
			print(1)
		elif x <= 2 * b:
			print(2)
		else:
			print((x + b - 1) // b)
f()


import sys
input = sys.stdin.readline
t = int(input())
for test in range(t):
	(n, x) = map(int, input().split())
	A = set(map(int, input().split()))
	MAX = max(A)
	if x in A:
		print(1)
		continue
	if x > MAX:
		print(-(-x // MAX))
		continue
	print(2)


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	ans = 0
	seq = list(map(int, input().split()))
	if d in seq:
		print('1')
	elif d < max(seq):
		print('2')
	else:
		ans += (d - 1) // max(seq)
		print(ans + 1)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	li = list(map(int, input().split()))
	res = 10 ** 10
	t2 = set(li)
	for i in li:
		if x % i == 0:
			res = min(res, x // i)
			continue
		t = x // i + 2
		if x // i >= 1:
			t -= 1
		res = min(res, t)
	print(res)


import math

def numbersListInput():
	aux = list(map(int, input().strip().split()))
	return aux

def findHops(distance, favorites):
	if distance in favorites:
		return 1
	biggest_number = max(favorites)
	if biggest_number > x:
		return 2
	else:
		return math.ceil(x / biggest_number)
test_cases = int(input())
for i in range(test_cases):
	aux = numbersListInput()
	n = aux[0]
	x = aux[1]
	aux = numbersListInput()
	print(findHops(x, aux))


T = int(input())
for test in range(T):
	(favnum, distance) = map(int, input().split())
	favlst = list(map(int, input().split()))
	if distance in favlst:
		print(1)
	else:
		Max = max(favlst)
		if Max > distance:
			print(2)
		else:
			if distance % Max == 0:
				ans = int(distance / Max)
			else:
				ans = int(distance / Max) + 1
			print(ans)


import sys

def main():
	ints = [int(k) for k in sys.stdin.read().split()]
	t = ints[0]
	q = 1
	for i in range(t):
		n = ints[q]
		x = ints[q + 1]
		m = ints[q + 2:q + 2 + n]
		p = max(m)
		s = x // p
		j = p * s
		if p > x:
			if x in m:
				print(1)
			else:
				print(2)
		elif j == x:
			print(s)
		else:
			print(s + 1)
		q += 2 + n
main()


nc = int(input())
for cas in range(nc):
	(n, x) = map(int, input().split())
	l = [int(i) for i in input().split()]
	l.sort()
	if l[-1] > x:
		if l.count(x) == 0:
			print(2)
		else:
			print(1)
	elif x % l[-1] == 0:
		print(x // l[-1])
	else:
		print(x // l[-1] + 1)


from math import floor, ceil
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	if k in arr:
		print('1')
	else:
		print(max(2, ceil(k / arr[0])))


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	s = set(l)
	m = max(l)
	if x in s:
		print(1)
		continue
	if m > x:
		print(2)
	elif x % m == 0:
		print(x // m)
	else:
		print(x // m + 1)


t = int(input())

def func(x, a, hop):
	maxi = -1
	full = False
	midplus = False
	for i in a:
		if i > maxi:
			maxi = i
		if i == x:
			full = True
		if i >= x / 2:
			midplus = True
	if full:
		print(1 + hop)
	elif midplus:
		print(2 + hop)
	else:
		dist = int((x - maxi) / maxi) * maxi
		hop = int((x - maxi) / maxi)
		func(x - dist, a, hop)
for itera in range(t):
	(n, x) = [int(y) for y in input().split()]
	a = list(map(int, input().split()))
	hop = 0
	func(x, a, hop)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	for test in range(tests):
		[n, x] = inlt()
		fav = inlt()
		fav.sort(reverse=True)
		hops = 0
		hashm = {}
		for i in fav:
			hashm[i] = 1
		if x in hashm:
			print(1)
		elif x % fav[0] == 0:
			print(int(x / fav[0]))
		else:
			dum = x - 2 * fav[0]
			if dum < 0:
				print(2)
			else:
				hop = int(dum / fav[0]) + 1
				left = x - hop * fav[0]
				if left in hashm:
					print(hop + 1)
				else:
					print(hop + 2)
	return
main()


for _ in ' ' * int(input()):
	(a, b) = map(int, input().split())
	z = list(map(int, input().split()))
	if b in z:
		print(1)
	else:
		print(max(2, (b + max(z) - 1) // max(z)))


import math

def cowAndFriend(n, x, array):
	m = max(array)
	hops = math.ceil(x / m)
	if hops == 1 and x not in array:
		hops += 1
	return hops
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	print(cowAndFriend(n, x, l))


from collections import defaultdict
a = int(input())
for i in range(a):
	al = defaultdict(int)
	(n, x) = map(int, input().split())
	z = list(map(int, input().split()))
	if x >= max(z):
		if x % max(z) == 0:
			print(x // max(z))
		else:
			print(x // max(z) + 1)
	else:
		flag = 0
		z.sort(reverse=True)
		for i in range(len(z)):
			if x // z[i] == 1 and x % z[i] == 0:
				flag = 1
				break
		if flag == 1:
			print(1)
		else:
			print(2)


import math

def g(a, x):
	n = len(a)
	b = math.ceil(x / max(a))
	if b > 1:
		return b
	else:
		for i in range(len(a)):
			if x == a[i]:
				return 1
		return 2
t = int(input())
while t > 0:
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(g(a, x))
	t -= 1


from math import floor, ceil
t = int(input())
for _ in range(t):
	ans = 0
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	aset = set(a)
	maxx = max(a)
	cur = 0
	if x in aset:
		print(1)
		continue
	if x <= 2 * maxx:
		print(2)
		continue
	ops = floor(x / maxx)
	if x % maxx == 0:
		print(ops)
		continue
	else:
		print(ops + 1)
		continue


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = set(map(int, input().split()))
	ans = ceil(x / max(a))
	if ans == 1:
		if x in a:
			pass
		else:
			ans += 1
	print(ans)


t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	num = list(map(int, input().split()))
	if x in num:
		print(1)
		continue
	ma = max(num)
	if ma > x:
		print(2)
	else:
		print((x + ma - 1) // ma)


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		(n, x) = map(int, input().split())
		aa = [int(a) for a in input().split()]
		if x in aa:
			print(1)
			return
		mx = max(aa)
		print(max(2, (x - 1) // mx + 1))
	q = int(input())
	for _ in range(q):
		solve()
main()


from collections import Counter, defaultdict, deque
from heapq import heapify, heappush, heappop, heappushpop
from sys import stdin
from math import ceil
int_inp = lambda : int(stdin.readline().strip())
lst_inp = lambda : [int(i) for i in stdin.readline().strip().split(' ')]
str_inp = lambda : stdin.readline().strip()
for _ in range(int_inp()):
	(n, x) = lst_inp()
	a = lst_inp()
	if x in a:
		print(1)
		continue
	m = max(a)
	print(ceil(x / m) if m <= x else 2)


t = int(input())
import math

def find(x, arr):
	for k in arr:
		if k == x:
			return 1
	if min(arr) > x:
		return 2
	if max(arr) < x:
		if x % max(arr):
			return x // max(arr) + 1
		else:
			return x // max(arr)
	else:
		return 2
for i in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	print(find(x, arr))


t = int(input())
z = []
for i in range(0, t):
	(n, x) = input().split()
	n = int(n)
	x = int(x)
	s = 0
	cnt = 0
	b = list(map(int, input().strip().split()))[:n]
	m = max(b)
	if x in b:
		z.append(1)
	elif m > x:
		z.append(2)
	elif x % m == 0:
		z.append(x // m)
	else:
		z.append(x // m + 1)
for i in z:
	print(i)


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin, tan

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()

def sieve(x):
	a = [True] * (x + 1)
	sq = floor(sqrt(x))
	for i in range(3, sq + 1, 2):
		if a[i]:
			for j in range(i * i, x + 1, i):
				a[j] = False
	if x > 1:
		p = [2]
	else:
		p = []
	for i in range(3, x + 1, 2):
		if a[i]:
			p.append(i)
	return p

def prime_factor(x):
	c = 1
	i = 0
	while p[i] * p[i] <= x:
		if not x % p[i]:
			c += 1
			while not x % p[i]:
				x //= p[i]
		i += 1
	if x > 1:
		c += 1
	return c
res = ['YES', 'NO']
for _ in range(ii()):
	(n, d) = mi()
	a = li()
	x = max(a)
	p = ceil(d / x)
	if p == 1 and d not in a:
		p += 1
	print(p)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 10 ** 18
	for i in range(n):
		cnt = x // a[i]
		if x % a[i]:
			cnt += 1 if cnt else 2
		ans = min(ans, cnt)
	print(ans)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	b = sorted(a)
	lar = b[n - 1]
	if x in a:
		print('1')
	elif lar > x:
		print('2')
	else:
		ans = x % lar
		if ans == 0:
			print(x // lar)
		else:
			ans += 1
			print(x // lar + 1)


def cow(arr):
	cont = 0
	for i in arr:
		aux = 0
		aux2 = 10000000000
		if cont % 2 == 0:
			dist = i[1]
		else:
			i.sort(reverse=True)
			for j in i:
				if dist == j:
					aux = 1
					aux2 = 1
					break
				elif dist / j <= 2:
					aux = 2
				elif dist % j == 0:
					aux = dist // j
				else:
					aux = dist // j + 1
				if aux < aux2:
					aux2 = aux
			print(aux2)
		cont += 1
		continue
arr = []
n = int(input())
for i in range(n * 2):
	arr.append(list(map(int, input().strip().split())))
cow(arr)


from sys import exit

def iis():
	return map(int, input().split())

def ii():
	return int(input())

def liis():
	return list(map(int, input().split()))
t = ii()
for _ in range(t):
	(n, x) = iis()
	a = liis()
	maxi = max(a)
	if x in a:
		print(1)
	elif x % maxi == 0:
		print(x // maxi)
	elif x // maxi == 0:
		print(2)
	else:
		print(x // maxi + 1)


import sys
import math
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	mas = list(map(int, input().split()))
	if x in mas:
		print(1)
	else:
		c = max(mas)
		ans = math.ceil(x / c)
		if ans == 1:
			print(ans + 1)
		else:
			print(ans)


for _ in range(int(input())):
	(n, m) = input().split()
	n = int(n)
	m = int(m)
	x = [int(x) for x in input().split()]
	t = []
	for i in x:
		if m % i == 0:
			t.append(int(m / i))
		elif int(m / i) < 2:
			t.append(2)
		else:
			t.append(int(m / i) + 1)
	print(min(t))


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	mx = a[-1]
	if x in a:
		print(1)
	elif x % mx == 0:
		print(x // mx)
	elif mx > x:
		print(2)
	else:
		print(x // mx + 1)


import sys
n = int(sys.stdin.readline())
for i in range(n):
	(a, b) = map(int, sys.stdin.readline().split())
	X = sys.stdin.readline().split()
	assert len(X) == a
	for j in range(a):
		X[j] = int(X[j])
	M = max(X)
	c = b // M
	if c > 1:
		c -= 1
		b = b % M + M
	else:
		c = 0
	for k in X:
		if k == b:
			print(c + 1)
			break
	else:
		print(c + 2)


t = int(input())
for i in range(0, t):
	(n, d) = map(int, input().split())
	lst = list(map(int, input().split(' ')))
	lst.sort()
	if d in lst:
		print('1')
	elif lst[n - 1] > d:
		print('2')
	elif d % lst[n - 1] == 0:
		print(int(d / lst[n - 1]))
	else:
		c = int(d // lst[n - 1] + 1)
		print(c)


import sys
from math import ceil
input = sys.stdin.readline
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
SI = lambda : input().strip('\n')
for _ in range(int(input())):
	(n, x) = MI()
	a = LI()
	ok = a.count(x)
	print(1 if ok else max(2, int(ceil(x / max(a)))))


import sys
input = lambda : sys.stdin.readline().rstrip()
from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = [int(i) for i in input().split()]
	if x in a:
		print(1)
		continue
	i = max(a)
	hop = 0
	ans = 0
	hop = ceil(x / i)
	if hop == 1:
		if i > x:
			print(2)
			continue
	print(hop)


import sys
input = sys.stdin.readline
(t,) = map(int, input().split())
for _ in range(t):
	(N, y) = map(int, input().split())
	A = set(map(int, input().split()))
	if y in A:
		print(1)
	else:
		ma = max(A)
		k = -(-y // ma)
		if k == 1:
			print(2)
		else:
			print(k)


from copy import copy
from math import *

def arr_float_inp():
	return [float(s) for s in input().split()]

def arr_int_inp():
	return [int(s) for s in input().split()]

def int_inp():
	return int(input())

def float_inp():
	return float(input())

def comp(a):
	return a[0]

def gcd(a, b):
	if b != 0:
		return gcd(b, a % b)
	else:
		return a
for _ in range(int_inp()):
	(n, x) = arr_int_inp()
	a = arr_int_inp()
	if x in a:
		print(1)
	else:
		max_el = max(a)
		if x % max_el == 0:
			print(x // max_el)
		else:
			left = max_el * ceil(x / 2 / max_el)
			right = max_el * ceil(x / 2 / max_el)
			while x + left > right and x + right > left and (left + right > x) and (left >= 0):
				left -= max_el
			left += max_el
			print(int(left / max_el + right / max_el))


for t in range(int(input())):
	f = False
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = float('-inf')
	for y in a:
		if x == y:
			print(1)
			f = True
			break
		m = max(m, y)
	if f:
		continue
	if x % m:
		print(max(1, x // m) + 1)
	else:
		print(x // m)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	L = list(map(int, input().split()))
	A = max(L)
	if x in L:
		print(1)
		continue
	if 0 <= x <= 2 * A:
		print(2)
		continue
	print(math.ceil(x / A))


t = int(input(''))
for _ in range(t):
	[n, d] = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	ans = 10000000000000
	for i in range(n):
		if arr[i] > d:
			ans = min(ans, 2)
		else:
			ans = min(ans, (d + arr[i] - 1) // arr[i])
	print(ans)


t = int(input())
ans = []
for i in range(t):
	(n, x) = map(int, input().strip().split())
	a = list(map(int, input().strip().split()))[0:n]
	max1 = a[0]
	flag = 0
	for i in a:
		if max1 < i:
			max1 = i
		if i == x:
			flag = 1
	if flag == 1:
		ans.append(1)
	elif x % max1 == 0:
		ans.append(max(2, x // max1))
	else:
		ans.append(max(2, x // max1 + 1))
for i in ans:
	print(i)


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	s = list(map(int, input().split()))
	p = 1
	for i in s:
		if i == m:
			print(1)
			p = 0
			break
	if p:
		mx = max(s)
		print(max(2, (m + mx - 1) // mx))


import math

def smallestSubWithSum(arr, n, x):
	min_len = n + 1
	for start in range(0, n):
		curr_sum = arr[start]
		if curr_sum > x:
			return 1
		for end in range(start + 1, n):
			curr_sum += arr[end]
			if curr_sum > x and end - start + 1 < min_len:
				min_len = end - start + 1
	return min_len
T = int(input())
for i in range(T):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	elif max(a) > x:
		print(2)
	else:
		print(math.ceil(x / max(a)))


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = dict()
	m = -1
	for x in map(int, input().split()):
		a[x] = 1
		m = max(m, x)
	if d in a:
		print(1)
		continue
	if m > d:
		print(2)
		continue
	h = math.ceil((d - 2 * m) / m)
	if d - h * m == 0:
		print(h)
		continue
	if d - h * m in a:
		print(h + 1)
		continue
	else:
		print(h + 2)
		continue


import os
import operator
import sys
from _collections import defaultdict
import bisect
from io import BytesIO, IOBase

def inar():
	return [int(k) for k in input().split()]

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def main():
	for _ in range(int(input())):
		(n, x) = map(int, input().split())
		arr = inar()
		res = 10 ** 18
		for i in range(n):
			if x < arr[i]:
				res = min(res, 2)
				continue
			div = x // arr[i]
			if x % arr[i] == 0:
				res = min(res, div)
			else:
				res = min(res, div + 1)
		print(res)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from math import ceil
t = int(input())
for I in range(t):
	(n, x) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	poss = 0
	for i in a:
		if i == x:
			print(1)
			poss = 1
			break
	if poss == 0:
		print(max(2, ceil(x / max(a))))


import math as mt
import bisect
import sys
input = sys.stdin.readline
t = int(input())
import collections
import heapq
p = 10 ** 9 + 7

def ncr_util():
	inv[0] = inv[1] = 1
	fact[0] = fact[1] = 1
	for i in range(2, 300001):
		inv[i] = inv[i % p] * (p - p // i) % p
	for i in range(1, 300001):
		inv[i] = inv[i - 1] * inv[i] % p
		fact[i] = fact[i - 1] * i % p

def solve(n, x, l):
	maxi = max(l[:])
	d = {}
	for i in l:
		d[i] = 1
	if d.get(x, -1) != -1:
		return 1
	if x % maxi == 0:
		return x // maxi
	else:
		ans = 1
		ans += x // maxi
		return max(2, ans)
for _ in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	print(solve(n, x, l))


T = int(input())
for t in range(T):
	(n, x) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	b = max(a)
	ans = 1000000000
	for y in a:
		if y == x:
			ans = 1
		elif x // b == 0:
			ans = min(ans, 2)
		else:
			ans = min(ans, x // b + (x % b != 0))
	print(ans)


R = lambda : map(int, input().split())
(t,) = R()
exec(t * 'n,x=R();print(min(-1--x//y or x%y>0for y in R())+1);')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def hop():
	for _ in range(t):
		(n, dis) = [int(x) for x in input().split()]
		(*a,) = [int(x) for x in input().split()]
		maxhop = max(a)
		if dis in a:
			yield 1
		elif dis % maxhop == 0:
			yield (dis // maxhop)
		else:
			yield max(dis // maxhop + 1, 2)
t = int(input())
ans = hop()
print(*ans, sep='\n')


t = int(input())
l = []
for i in range(t):
	que = [int(j) for j in input().strip().split()]
	n = que[0]
	x = que[1]
	lst = [int(j) for j in input().strip().split()]
	Max = max(lst)
	if x in lst:
		ans = 1
	elif Max < x:
		ans = int((x + Max - 1) / Max)
	else:
		ans = int((x + Max - 1) / Max) + 1
	l.append(ans)
for i in l:
	print(i)


import math

def main():
	for _ in range(int(input())):
		(n, x) = map(int, input().split())
		arr = list(map(int, input().split()))
		if x in arr:
			print(1)
		else:
			print(max(2, math.ceil(x / max(arr))))
main()


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	li = list(map(int, input().split()))
	ma = max(li)
	if x in li:
		print(1)
	elif ma > x:
		print(2)
	else:
		c = x // ma
		if x % ma != 0:
			c += 1
		print(c)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	arr = sorted(list(map(int, input().split())))
	mx = arr[-1]
	ans = 0
	while mx <= x // 2:
		val = x // 2 // mx
		x -= mx * val
		ans += val
	if x > 0:
		if x in arr:
			ans += 1
		else:
			ans += 2
	print(ans)


import math

def euclidean_distance(x1, y1, x2, y2):
	return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
t = int(input())
for i in range(t):
	(n, distance) = map(int, input().split())
	fav_numbers = list(map(int, input().split()))
	if distance in fav_numbers:
		print(1)
	elif max(fav_numbers) > distance:
		print(2)
	else:
		print(math.ceil(distance / max(fav_numbers)))


t = int(input())
while t != 0:
	(n, x) = map(int, input().split())
	arrN = sorted(list(map(int, input().split())))
	maxArr = arrN[-1]
	if maxArr > x:
		if arrN.__contains__(x):
			result = 1
		else:
			result = 2
	elif maxArr == x:
		result = 1
	elif x % maxArr == 0:
		result = x // maxArr
	else:
		result = x // maxArr + 1
	print(result)
	t -= 1


import sys
import bisect
import heapq
from math import *
from collections import defaultdict as dd
from collections import deque
from collections import Counter as c
from itertools import combinations as comb
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(var)

def l():
	return list(map(int, data().split()))

def sl():
	return list(map(str, data().split()))

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [[val for i in range(n)] for j in range(m)]
for _ in range(int(data())):
	(n, x) = sp()
	arr = l()
	answer = sys.maxsize
	for i in arr:
		if x < i:
			answer = min(answer, 2)
		else:
			answer = min(answer, ceil(x / i))
	print(answer)


t = int(input())
for te in range(t):
	(n, d) = map(int, input().split())
	arr = list(map(int, input().split()))
	far = max(arr)
	if arr.__contains__(d) == True:
		print(1)
	else:
		print(max(2, (d + far - 1) // far))


import bisect

def solution():
	(n, x) = [int(x) for x in input().strip().split()]
	a = [int(x) for x in input().strip().split()]
	M = max(a)
	if x in a:
		print('1')
	else:
		print(max((x - 1) // M + 1, 2))

def main():
	T = int(input().strip())
	for _ in range(T):
		solution()
main()


import sys
input = sys.stdin.readline
mii = lambda : map(int, input().split())
for _ in range(int(input())):
	(n, x) = mii()
	has = 0
	a = 0
	for i in mii():
		if x == i:
			has = 1
		a = max(a, i)
	if has:
		print(1)
	else:
		print(max(2, (x - 1) // a + 1))


t = int(input())
for i in range(t):
	(n, b) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.count(b) != 0:
		print(1)
		continue
	a.sort(reverse=True)
	if a[0] > b:
		print(2)
		continue
	print(int(b % a[0] != 0) + b // a[0])


from math import ceil
n = int(input())
for _ in range(n):
	(nb, distance) = [int(x) for x in input().split()]
	favorite = [int(x) for x in input().split()]
	if distance in favorite:
		print(1)
	else:
		larg = max(favorite)
		res = max(2, ceil(distance / larg))
		print(res)


T = int(input())
for _ in range(T):
	(N, D) = [int(x) for x in input().split(' ')]
	a = [int(x) for x in input().split(' ')]
	if D in a:
		print(1)
	else:
		x = max(a)
		if 2 * x >= D:
			print(2)
		elif D % x == 0:
			print(D // x)
		else:
			print(D // x + 1)


for i in range(int(input())):
	l = list(map(int, input().split()))
	m = list(map(int, input().split()))
	n = l[0]
	k = l[1]
	m.sort(reverse=True)
	bruh = m[0]
	f = 0
	for j in range(len(m)):
		if m[j] == k:
			f = 1
			break
	if f == 1:
		print(1)
	elif bruh <= k:
		if k % bruh == 0:
			print(k // bruh)
		else:
			print(k // bruh + 1)
	else:
		print(2)


t = int(input())
for p in range(0, t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a = sorted(a)
	if x in a:
		print(1)
	elif x % 2 == 0 and x // 2 in a or x < a[n - 1]:
		print(2)
	else:
		temp = x // a[n - 1]
		if x - temp * a[n - 1] in a:
			ans = temp + 1
		else:
			ans = temp + 1
		for i in range(0, n):
			if x % a[i] == 0:
				if x // a[i] < ans:
					ans = x // a[i]
		print(ans)


def solve(n, a, x):
	if x in a:
		return 1
	step = max(a)
	if step > x:
		return 2
	return (x + step - 1) // step
t = int(input())
for _ in range(t):
	(n, x) = [int(_) for _ in input().split()]
	a = [int(_) for _ in input().split()]
	print(solve(n, a, x))


from math import ceil
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	b = ceil(x / 2)
	flag = 0
	for j in range(n):
		if a[j] >= b:
			flag = 1
			break
	if x in a:
		print(1)
	elif flag == 1:
		print(2)
	else:
		a.sort(reverse=True)
		print(ceil(x / a[0]))


import sys
for _mind_control in range(int(input())):
	(n, x) = [int(i) for i in sys.stdin.readline().split()]
	arr = sorted([int(i) for i in sys.stdin.readline().split()], reverse=True)
	if x in arr:
		print(1)
	elif x < arr[0]:
		print(2)
	else:
		print((x + arr[0] - 1) // arr[0])


import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub
sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(input())

def read_int_n():
	return list(map(int, input().split()))

def read_float():
	return float(input())

def read_float_n():
	return list(map(float, input().split()))

def read_str():
	return input().strip()

def read_str_n():
	return list(map(str, input().split()))

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

def slv(N, X, A):
	ma = max(A)
	if X % ma == 0:
		ans = X // ma
	else:
		ans = max(2, X // ma + 1)
	for a in A:
		if X % a == 0:
			ans = min(ans, X // a)
	return ans

def main():
	T = read_int()
	for _ in range(T):
		(N, X) = read_int_n()
		A = read_int_n()
		print(slv(N, X, A))
main()


t = int(input())
for p in range(t):
	nx = input()
	nx = nx.split()
	n = int(nx[0])
	x = int(nx[1])
	w = input()
	w = w.split()
	a = []
	for fav in range(n):
		a.append(int(w[fav]))
	if x in a:
		print(1)
	elif max(a) * 2 >= x:
		print(2)
	elif x % max(a) == 0:
		print(x // max(a))
	else:
		print(x // max(a) + 1)


def solve():
	(n, d) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n):
		if a[i] == d:
			print('1')
			return
	for i in range(n):
		if a[i] >= d:
			print('2')
			return
	print(int((d - 1) / a[n - 1] + 1))
for _ in range(int(input())):
	solve()


def main():
	t = int(input())
	while t:
		t -= 1
		(n, x) = map(int, input().split())
		a = list(map(int, input().split()))
		if x in a:
			print(1)
		elif x == 1:
			print(2)
		else:
			v = min(max(a), x - 1)
			print((x + v - 1) // v)
main()


t = int(input())
store = []
for i in range(t):
	(n, x) = [int(j) for j in input().split(' ')]
	a = [int(j) for j in input().split(' ')]
	pryg = 0
	for j in a:
		if j == x:
			case = 1
			break
		else:
			case = 0
			pryg = max(pryg, j)
	if case == 0:
		store.append(str(max(1, x // pryg) + int(x % pryg > 0)))
	else:
		store.append('1')
for j in store:
	print(str(j))


for i in range(int(input())):
	(n, x) = map(int, input().split())
	ans = 100000000000000000000
	l = list(map(int, input().split()))
	for j in l:
		if x < j:
			ans = min(ans, 2)
		elif x % j == 0:
			ans = min(ans, x // j)
		else:
			ans = min(ans, x // j + 1)
	print(ans)


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = list(map(int, input().split()))
	s = set(a)
	a.sort()
	m = a[n - 1]
	ans = 0
	f = 0
	if d >= m:
		f = 1
	ans += d // m
	d %= m
	if f == 0:
		if d in s:
			ans += 1
		else:
			ans += 2
	elif d > 0:
		ans += 1
	print(ans)


import math
t = int(input())
for a in range(t):
	(n, d) = map(int, input().split())
	l = list(map(int, input().split()))
	if d in l:
		print(1)
	elif max(l) > d:
		print(2)
	elif max(l) < d:
		print(math.ceil(d / max(l)))


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n').split(' ')]

def li3():
	return [int(i) for i in input().rstrip('\n')]

def dist(a, b):
	return ((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) ** 0.5
for _ in range(val()):
	(n, x) = li()
	l = set(li())
	tot = 0
	l1 = sorted(l)[::-1]
	curr = [0, 0]
	fin = [x, 0]
	ans = float('inf')
	for i in l1:
		if i > x:
			ans = min(ans, 2)
		else:
			ans = min(ans, x // i + 1 if x // i != x / i else x // i)
	print(ans)


n = int(input())
for j in range(n):
	(_, x) = map(int, input().split(' '))
	a = [i for i in map(int, input().split())]
	a.sort(reverse=True)
	if x in a:
		print(1)
	else:
		print(max(2, (x + a[0] - 1) // a[0]))


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	A = [int(j) for j in input().split()]
	if x in A:
		res = 1
	elif max(A) >= x / 2:
		res = 2
	else:
		res = 0
		m = max(A)
		res += x // m
		if x % m != 0:
			res += 1
	print(res)


import math

def f():
	l1 = input().split(' ')
	l2 = input().split(' ')
	n = int(l1[0])
	x = int(l1[1])
	am = 0
	for i in range(n):
		if int(l2[i]) == x:
			print(1)
			return 0
		am = max(am, int(l2[i]))
	if am > x:
		print(2)
		return 0
	else:
		print(math.ceil(x / am))
		return 0
row = int(input())
for r in range(row):
	f()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
from math import ceil
for case in range(itg()):
	(n, x) = mpint()
	arr = tuple(mpint())
	if x in arr:
		print(1)
		continue
	mx = max(arr)
	ans = ceil(x / mx)
	if ans == 1:
		ans += 1
	print(ans)


for _ in [0] * int(input()):
	(n, x) = map(int, input().split())
	a = [*map(int, input().split())]
	print(-(-x // max(a)) + (x < max(a) and x not in a))


def main():
	t = int(input())
	for _ in range(t):
		(n, x) = map(int, input().split())
		a = list(map(int, input().split()))
		if x in a:
			print(1)
			continue
		aa = max(a)
		ans = max(x - aa, 0) // aa
		if x % aa == 0:
			print(ans + 1)
		else:
			print(ans + 2)
	return
main()


import math
t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	max_ai_under_x = 0
	existMoreThan_x = False
	for ai in a:
		if ai <= x:
			max_ai_under_x = max(max_ai_under_x, ai)
		else:
			existMoreThan_x = True
	if max_ai_under_x != 0:
		if existMoreThan_x:
			print(min(2, math.ceil(x / max_ai_under_x)))
		else:
			print(math.ceil(x / max_ai_under_x))
	else:
		print(2)


t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().split()))
	a = set(map(int, input().split()))
	nmax = max(a)
	counter = max(x // nmax - 1, 0)
	dist = x - counter * nmax
	if dist in a:
		counter = counter + 1
	else:
		counter = counter + 2
	print(counter)


from sys import stdin
for _ in range(int(stdin.readline().rstrip())):
	(n, k) = map(int, stdin.readline().rstrip().split(' '))
	l = list(map(int, stdin.readline().rstrip().split(' ')))
	l.sort(reverse=True)
	m = 99999999999
	for i in range(n):
		x = k // l[i]
		if x * l[i] == k:
			if x < m:
				m = x
	t = k // l[0]
	if k % l[0]:
		if t == 0:
			t = 2
		elif t > 0:
			t += 1
	if t - m > 0:
		t = m
	print(t)


import sys, math

def ans(arr, x):
	m = sys.maxsize
	for i in range(len(arr)):
		if arr[i] is x:
			out = 1
		elif arr[i] > x:
			out = 2
		else:
			out = math.ceil(x / arr[i])
		m = min(m, out)
	return m
	pass
t = int(input())
while t > 0:
	(n, x) = list(map(int, input().strip().split(' ')))
	arr = list(map(int, input().strip().split(' ')))
	print(ans(arr, x))
	t -= 1


t = int(input())
a = []
for i in range(t):
	(b, d) = input().split()
	c = int(d)
	e = list(map(int, input().split()))
	a.append([c, e])
for i in a:
	x = i[0]
	k = i[1]
	if x in k:
		print(1)
	else:
		p = max(k)
		if p > x:
			print(2)
		elif x % p == 0:
			print(int(x // p))
		else:
			print(int(x // p) + 1)


T = input()
X = []
V = []
for t in range(int(T)):
	SD = list(input().split())
	n = int(SD[0])
	x = int(SD[1])
	v = [int(item) for item in input().split()]
	X.append(x)
	V.append(v)
for t in range(int(T)):
	x = X[t]
	v = V[t]
	maxV = max(v)
	if x > 2 * maxV:
		div = (x - 2 * maxV) // maxV
		x = x - maxV * div
		count = div
	else:
		count = 0
	while True:
		last = False
		maxL = 2 * maxV
		if x <= maxL:
			last = True
			break
		min = x
		for vv in v:
			if abs(x - vv) < min:
				min = abs(x - vv)
		count = count + 1
		x = min
	delta = 2
	for vv in v:
		if x == vv:
			delta = 1
			break
	print(count + delta)


import math
for i in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))[:n]
	if x in arr:
		print(1)
	else:
		print(max(2, math.ceil(x / max(arr))))


import math
q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split())
	ints = [int(x) for x in input().split()]
	ints = set(ints)
	max1 = max(ints)
	if max1 > x and (not x in ints):
		print(2)
	else:
		print(math.ceil(x / max1))


for nt in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	if x in l:
		print(1)
		continue
	a = max(l)
	if a > x:
		print(2)
	elif x % a == 0:
		print(x // a)
	else:
		print(x // a + 1)


def solution():
	from sys import stdin, stdout
	(_input, _print, _range, _int, _len, _str) = (stdin.readline, stdout.write, range, int, len, str)
	_max = max
	for _ in _range(_int(_input())):
		(n, x) = [_int(i) for i in _input().split()]
		arr = [_int(i) for i in _input().split()]
		max_ = _max(arr)
		step = x // max_
		if x % max_ > 0 and step == 0:
			for i in arr:
				if i == x:
					step += 1
					break
			else:
				step += 2
		elif x % max_ > 0:
			step += 1
		print(step)
solution()


from math import ceil
for _ in range(int(input())):
	(n, x) = (int(x) for x in input().split())
	a = [int(x) for x in input().split()]
	if x in a:
		print(1)
	elif max(a) > x:
		print(2)
	else:
		print(ceil(x / max(a)))


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil, pi, sin, cos, acos, atan
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
from itertools import permutations, combinations
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
out = lambda x: stdout.write(str(x) + '\n')
t = ip()
for _ in range(t):
	(n, x) = inp()
	arr = list(inp())
	arr.sort()
	ans = 0
	ansarr = []
	dic = dd(bool)
	for i in arr:
		dic[i] = True
	while arr:
		ans = 0
		ele = arr[-1]
		if ele == x:
			ans += 1
		elif ele >= x / 2:
			ans += 2
		else:
			temp = x
			ans += x // ele
			temp %= ele
			if temp == 0:
				pass
			else:
				ans += 1
		arr.pop()
		dic[ele] = False
		ansarr.append(ans)
	out(min(ansarr))


for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(sorted(map(int, input().split()), reverse=True))
	ans = 1
	if x in a:
		print(1)
		continue
	elif x < a[0]:
		print(2)
	else:
		print((x + a[0] - 1) // a[0])


t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split(' '))
	y = list(map(int, input().split()))
	y = sorted(y)
	if m in y:
		print(1)
	elif y[-1] > m:
		print(2)
	else:
		(d, r) = (m // y[-1], m % y[-1])
		if r == 0:
			print(d)
		else:
			print(d + 1)


t = int(input())
for l in range(t):
	nx = list(map(int, input().split()))
	Mtx = list(map(int, input().split()))
	x = max(Mtx)
	for j in range(len(Mtx)):
		if Mtx[j] > nx[1]:
			Mtx[j] = -1
	y = max(Mtx)
	if x > nx[1]:
		if y < 1:
			print(2)
		else:
			print(min((nx[1] - 1) // y + 1, 2))
	else:
		print((nx[1] - 1) // x + 1)


t = int(input())
while t:
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	if k in arr:
		print('1')
		t -= 1
		continue
	else:
		tmx = max(arr)
		result = max(2, (k + tmx - 1) // tmx)
	print(result)
	t -= 1


def solv():
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	a = max(arr)
	if a <= x:
		print((x - 1) // a + 1)
	elif x in arr:
		print(1)
	else:
		print(2)
for _ in range(int(input())):
	solv()


def solve(n, x, a):
	aset = set()
	for el in a:
		aset.add(el)
	if x in aset:
		return 1
	a_max = max(a)
	if 2 * a_max > x:
		return 2
	result = x // a_max
	x %= a_max
	if x > 0:
		result += 1
	return result
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	result = solve(n, x, a)
	print(result)


from math import inf

def solve():
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	s = set(arr)
	ans = 2 if max(arr) * 2 >= x else inf
	for num in arr:
		if num <= x:
			curr = x // num
			rem = x % num
			if rem != 0:
				curr += 1
			ans = min(ans, curr)
	print(ans)
for _ in range(int(input())):
	solve()


from math import ceil
test_cases = int(input())
for t in range(test_cases):
	(n, x) = [int(i) for i in input().split()]
	numbers = [int(i) for i in input().split()]
	if x in numbers:
		print('1')
		continue
	maxNumber = max(numbers)
	if maxNumber > x:
		print('2')
		continue
	print(ceil(x / maxNumber))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
from math import ceil, floor, log, sqrt, factorial
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		(n, x) = mi()
		a = li()
		a.sort(reverse=True)
		s = 0
		ans = -1
		ss = ceil(x / 2)
		m = a[0]
		r = ceil(ss / m)
		if ss % m == 0:
			ans = 2 * r
		else:
			xx = x
			xx -= m
			xx /= 2
			if xx < (r - 1) * m:
				ans = 2 * r - 1
			else:
				ans = 2 * r
			ans = max(ans, 2)
		for i in range(n):
			if x % a[i] == 0:
				ans = min(ans, x // a[i])
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import bisect

def solve(n, x, arr):
	arr.sort(reverse=True)
	prob = []
	for j in range(n):
		must = x // arr[j]
		remains = x % arr[j]
		one = bisect.bisect_left(arr, remains)
		two = bisect.bisect_right(arr, remains)
		if remains == 0:
			prob.append(must)
		if one != two:
			prob.append(must + 1)
		elif must == 0:
			prob.append(must + 2)
		else:
			prob.append(must + 1)
	return min(prob)
	pass
t = int(input())
ans = []
for i in range(t):
	s = [int(x) for x in input().split()]
	n = s[0]
	x = s[1]
	arr = [int(x) for x in input().split()]
	ans.append(solve(n, x, arr))
for test in ans:
	print(test)


T = int(input())
for _ in range(0, T):
	(n, x) = map(int, input().split())
	s = [int(x) for x in input().split()]
	ans = 10 ** 9 + 7
	s.sort()
	arr = s[::-1]
	for i in range(0, len(arr)):
		if arr[i] > x:
			ans = min(ans, 2)
		elif arr[i] == x:
			ans = min(ans, 1)
		else:
			t = x // arr[i]
			if x % arr[i] != 0:
				t += 1
			ans = min(ans, t)
	print(ans)


t = int(input())
for i in range(t):
	a = input().split()
	n = int(a[0])
	x = int(a[1])
	nums = input().split()
	for j in range(n):
		nums[j] = int(nums[j])
	nums.sort()
	if nums[n - 1] > x:
		if x in nums:
			print(1)
		else:
			print(2)
	elif x % nums[n - 1] == 0:
		print(x // nums[n - 1])
	else:
		print(x // nums[n - 1] + 1)


from sys import stdin, stdout
from os import path
if path.exists('inp.txt'):
	stdin = open('inp.txt', 'r')
q = int(stdin.readline())
for _ in range(q):
	(n, x) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	ans = int(1000000000.0)
	for i in a:
		if x < i:
			ans = min(ans, 2)
		else:
			ans = min(ans, int((x - 1) / i) + 1)
	print(ans)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = dict(map(lambda x: (int(x), 0), input().split()))
	m = max(a)
	if x in a:
		print(1)
	elif m > x:
		print(2)
	else:
		ans = x // m
		if x % m != 0:
			ans += 1
		print(ans)


from bisect import bisect_left
ansLi = []
for tests in range(int(input())):
	(N, X) = map(int, input().split())
	A = list(map(int, input().split()))
	ans = float('inf')
	A.sort()
	sum1 = sum(A)
	for i in range(N - 1, -1, -1):
		if sum1 == X:
			ans = min(ans, i + 1)
		R = X % A[i]
		ans1 = X // A[i]
		if ans1 >= ans:
			sum1 -= A[i]
			continue
		if R != 0:
			if ans1 > 0:
				ans1 += 1
			else:
				ans1 += 2
		ans = min(ans, ans1)
		sum1 -= A[i]
	ansLi.append(ans)
for i in ansLi:
	print(i)


t = int(input())
while t:
	(n, x) = map(int, input().split())
	a = input().split()
	for i in range(n):
		a[i] = int(a[i])
	a.sort(reverse=True)
	if a[0] > x:
		flag = False
		for i in range(n):
			if x == a[i]:
				flag = True
		if flag:
			print(1)
		else:
			print(2)
	elif x % a[0] == 0:
		print(x // a[0])
	else:
		ans = x // a[0]
		print(ans + 1)
	t -= 1


import math
t = int(input())
for i in range(t):
	(n, x) = input().split()
	n = int(n)
	x = int(x)
	l = [int(x) for x in input().split()]
	m = math.ceil(x / 2)
	f = 0
	a = []
	for j in range(n):
		if l[j] >= m:
			ans = 2
			f = 1
			break
	for j in range(n):
		if l[j] == x:
			ans = 1
			f = 1
			break
	if f == 0:
		ans = int(math.ceil(x / max(l)))
	print(ans)


import math

def jump(a, b, x):
	if x >= b:
		return (x + b - 1) // b
	if x == 0:
		return 0
	if x == a:
		return 1
	return 2
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = -1
	mx2 = -1
	for i in range(n):
		if a[i] > mx:
			mx = a[i]
	for i in range(n):
		if a[i] > mx2 and a[i] != mx:
			mx2 = a[i]
	if len(a) == 1:
		print(jump(a[0], a[0], x))
	elif x in a:
		print(1)
	else:
		print(min(jump(mx2, mx, x), jump(min(a), max(a), x)))


from __future__ import division, print_function
from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
import math
import os
import sys

def binNumber(n, size=1):
	return bin(n)[2:].zfill(size)

def inar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def insp():
	return map(int, input().split())

def instr():
	return str(input())

def main():
	(n, x) = insp()
	a = inar()
	ans = int(10000000000.0)
	for p in a:
		if x % p == 0:
			ans = min(ans, x // p)
	m = max(a)
	temp = max(1, x // m) + 1
	ans = min(ans, temp)
	print(ans)
t = ini()
while t > 0:
	t -= 1
	main()


import math
t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	a = max(arr)
	b = math.ceil(x / a)
	temp = False
	for i in range(n):
		if arr[i] == x:
			temp = True
	if temp:
		print(1)
	elif b == 1:
		print(2)
	else:
		print(b)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = max(a)
	ans = 0
	if x in a:
		ans = 1
	elif m > x:
		ans = 2
	else:
		q = x // m
		r = x % m
		if r == 0:
			ans = q
		else:
			ans = q + 1
	print(ans)


import math
t = int(input())
while t != 0:
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = max(a)
	if x in a:
		print(1)
	elif m >= x / 2:
		print(2)
	elif x % m in a:
		print(math.floor(x / m) + 1)
	else:
		print(math.ceil(x / m))
	t = t - 1


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		a.sort(reverse=True)
		if a[0] > x:
			print(2)
		else:
			l1 = []
			for item in a:
				l1.append(math.ceil(x / item))
			print(min(l1))


import os
import sys
from io import BytesIO, IOBase
from math import ceil

def solution(arr, n, x):
	write(1 if x in arr else max(2, ceil(x / max(arr))))

def main():
	for _ in range(r_int()):
		(n, x) = r_array()
		arr = r_array()
		solution(arr, n, x)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())

def w_array(arr):
	for x in arr:
		write(x, end=' ')
	write()
main()


T = int(input())
for i in range(T):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.count(x):
		print(1)
	else:
		mx = max(a)
		if mx > x:
			print(2)
		else:
			print(x // mx + (x % mx > 0))


import math

def solve(a, n, x):
	mx = max(a)
	if x in a:
		return 1
	y = max(a)
	return max(2, math.ceil(x / y))
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(solve(a, n, x))


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		ans = False
		for i in a:
			if i > x:
				ans = True
				print(2)
				break
		v = max(a)
		if not ans:
			if x % v == 0:
				print(x // v)
			else:
				print(x // v + 1)


t = int(input())
for k in range(t):
	(n, x) = map(int, input().split())
	mas = list(map(int, input().split()))
	mas.sort()
	flag = 0
	for i in range(n):
		if mas[i] == x:
			print(1)
			flag = 1
	if flag:
		continue
	z = x // mas[-1]
	if z == 0:
		print(2)
		continue
	if x % mas[-1] != 0:
		z += 1
	print(z)


def solve(N, X, A):
	m = max(A)
	if m > X:
		if X in A:
			return 1
		return 2
	else:
		ret = X // m
		if X % m == 0:
			return ret
		return ret + 1
(T,) = map(int, input().split())
for t in range(T):
	(N, X) = map(int, input().split())
	A = [int(x) for x in input().split()]
	ans = solve(N, X, A)
	print(ans)


import sys

def input():
	return sys.stdin.readline()[:-1]

def solve():
	(n, x) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	a.sort()
	ans = 0
	if x in a:
		ans = 1
	elif x > a[-1]:
		if x % a[-1]:
			ans = x // a[-1] + 1
		else:
			ans = x // a[-1]
	else:
		ans = 2
	print(ans)
t = int(input())
for _ in range(t):
	solve()


import math
q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split())
	ints = [int(x) for x in input().split()]
	ints.sort()
	if ints[-1] > x and (not x in ints):
		print(2)
	else:
		print(math.ceil(x / ints[-1]))


import math

def get_list():
	raw_input = input() + ' '
	input_list = []
	d = 0
	for i in range(len(raw_input)):
		if raw_input[i] != ' ':
			d += 1
		elif raw_input[i] == ' ':
			input_list.append(int(raw_input[i - d:i]))
			d = 0
	return input_list

def main():
	t = int(input())
	while t > 0:
		n_x = get_list()
		n = n_x[0]
		x = n_x[1]
		a = get_list()
		M = max(a)
		if x < M:
			shortcut = False
			for a_i in a:
				if a_i == x:
					shortcut = True
			if shortcut:
				print(1)
			else:
				print(2)
		else:
			print(math.ceil(x / M))
		t -= 1
main()


import math
q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split())
	ints = [int(x) for x in input().split()]
	ints.sort(reverse=True)
	if ints[0] > x and (not x in ints):
		print(2)
	else:
		print(math.ceil(x / ints[0]))


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		f = max(a)
		print(max(2, (x + f - 1) // f))


from sys import stdin, stdout
from math import ceil
rl = lambda : stdin.readline()
rll = lambda : stdin.readline().split()

def main():
	T = int(rl())
	for _ in range(T):
		(n, goal) = (int(x) for x in rll())
		A = [int(x) for x in rll()]
		(M, ans) = (float('-inf'), 0)
		match = False
		for num in A:
			if num == goal:
				(ans, match) = (1, True)
			M = max(M, num)
		if not match:
			(q, r) = divmod(goal, M)
			ans = max(2, q + (1 if r > 0 else 0))
		stdout.write(str(ans))
		stdout.write('\n')
	stdout.close()
main()


t = int(input())

def flatboob(a, n, x, ans):
	flag = 0
	if ans == 1 or ans == 2:
		print(ans)
	else:
		temp = x // a[n - 1] - 1
		for i in range(0, n - 1):
			if x - temp * a[n - 1] % a[i] == 0:
				print(min(temp + 1, ans))
				flag = 1
				break
		if flag == 0:
			print(min(temp + 2, ans))
for i in range(0, t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	ans = 0
	if a.count(x) > 0:
		ans = ans + 1
	elif a[n - 1] > x:
		ans = ans + 2
	else:
		faltu = 0
		pow = 1
		k = n - 1
		while faltu == 0:
			if a[k] >= x / 2 ** pow:
				l = n - 1
				while a[l] >= x / 2 ** pow:
					if x % a[l] == 0:
						ans = ans + int(x / a[l])
						faltu = 1
						break
					l = l - 1
					if l < 0:
						break
				if faltu == 0:
					ans = ans + 2 ** pow
					break
			pow = pow + 1
	flatboob(a, n, x, ans)


for k in range(int(input())):
	(n, x) = map(int, input().split())
	mass = [int(x) for x in input().split()]
	if x in mass:
		print(1)
	elif max(mass) > x:
		print(2)
	else:
		print((x + max(mass) - 1) // max(mass))


nt = int(input())
for qz in range(nt):
	(n, d) = map(int, input().split())
	l = list(map(int, input().split()))
	m = max(l)
	if m > d:
		if d in l:
			print(1)
		else:
			print(2)
	elif d % m == 0:
		print(d // m)
	else:
		print(d // m + 1)


from sys import stdin, stdout
t = int(stdin.readline().strip())
for caso in range(t):
	(n, m) = map(int, stdin.readline().strip().split())
	s = list(map(int, stdin.readline().strip().split()))
	s.sort()
	ans = 10 ** 9
	for i in s:
		if m % i == 0:
			ans = min(ans, m // i)
		if m // s[-1] >= 1:
			ans = min(ans, 1 + m // s[-1])
		else:
			ans = min(ans, 2 + m // s[-1])
	stdout.write('%d\n' % ans)


import atexit
import io
import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = 0
	d = {}
	for j in a:
		m = max(j, m)
		d[j] = 1
	if d.get(x) == 1:
		print(1)
		continue
	if m >= x / 2:
		print(2)
	else:
		print(int(math.ceil(x / m)))


def go():
	(n, x) = list(map(int, input().split()))
	a = set(map(int, input().split()))
	ma = max(a)
	cand = (x + ma - 1) // ma
	if cand == 1 and x not in a:
		cand = 2
	print(cand)
t = int(input())
for _ in range(t):
	go()


from math import ceil
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	t = max(l)
	if x % t == 0:
		print(x // t)
	elif x // t or x - x // t in l:
		print(x // t + 1)
	else:
		print(x // t + 2)


from math import ceil
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	else:
		MAX = 0
		for j in a:
			if j > MAX:
				MAX = j
		val = int(ceil(x / MAX))
		ans = max(2, val)
		print(ans)


from operator import itemgetter
from collections import Counter
from itertools import product

def solve(n, x, a):
	m = max(a)
	(d, r) = divmod(x, m)
	if r == 0:
		print(d)
	elif d == 0 and (not x in a):
		print(2)
	else:
		print(d + 1)

def main():
	t = int(input())
	for i in range(t):
		(n, x) = map(int, input().split())
		a = list(map(int, list(input().split())))
		solve(n, x, a)
main()


t = int(input())
for o in range(t):
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	c = max(a)
	if c > m:
		f = 0
		for i in range(n):
			if a[i] == m:
				f = 1
				cnt = 1
				break
		if f == 0:
			cnt = 2
	else:
		cnt = 0
		cnt += m // c
		if m % c != 0:
			cnt += 1
	print(cnt)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	xs = list(map(int, input().split()))
	m = max(xs)
	if x in xs:
		print(1)
	else:
		ans = (x + m - 1) // m
		if ans * m != x and ans == 1:
			ans += 1
		print(ans)


def f1():
	T = int(input())
	while T != 0:
		T = T - 1
		A = [int(i) for i in input().split(' ')]
		B = [int(i) for i in input().split(' ')]
		print(Solver(A, B))

def f2():
	import math as m
	T = int(input())
	while T != 0:
		T = T - 1
		A1 = [int(i) for i in input().split(' ')]
		Array = [int(i) for i in input().split(' ')]
		Array.sort()
		Distance = A1[1]
		Steps = 0
		ptr = len(Array) - 1
		flag = False
		for k in range(0, len(Array)):
			if Distance % Array[k] == 0 and Distance / Array[k] == 1:
				print(1)
				flag = True
				break
		if flag == True:
			continue
		while Distance != 0:
			if Distance % Array[ptr] == 0:
				print(Steps + Distance // Array[ptr])
				flag = True
				break
			if Distance > 2 * Array[ptr] and Distance % Array[ptr] != 0:
				dval = Distance // Array[ptr]
				Steps = Steps + (dval - 1)
				Distance = Distance - (dval - 1) * Array[ptr]
			if Distance / 2 < Array[ptr] and Distance % Array[ptr] != 0:
				cosval = Array[ptr] / (Distance / 2)
				cosval = m.cos(cosval)
				cosval = cosval * cosval
				deg = m.degrees(m.asin(1 - cosval))
				if deg > 0 and deg < 90:
					flag = True
					print(Steps + 2)
					break
			if Distance >= Array[ptr]:
				Distance = Distance - Array[ptr]
				Steps = Steps + 1
			else:
				ptr = ptr - 1
		if flag == False:
			print(Steps)

def Solver(A, B):
	N = A[0]
	D = A[1]
	Ans = 0
	Adder = 0
	for i in range(0, len(B)):
		if D == 0:
			return Ans
		elif B[i] == 0:
			continue
		else:
			SetBack = i
			x = B[i]
			if D < i:
				return Ans
			while D >= i and x != 0:
				D = D - i
				Ans = Ans + 1
				x = x - 1
			if D == 0:
				return Ans
	return Ans
f2()


I = lambda : map(int, input().split())
for _ in range(int(input())):
	(_, x) = I()
	A = set(I())
	(n, m) = divmod(x, max(A))
	print(n + bool(m) if n else 2 - (x in A))


from math import *
from collections import *
from functools import *
from bisect import *
from itertools import *
from heapq import *
from statistics import *
inf = float('inf')
ninf = -float('inf')
ip = input
alphal = 'abcdefghijklmnopqrstuvwxyz'
alphau = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def ipl():
	return list(map(int, ip().split()))

def ipn():
	return int(ip())

def ipf():
	return float(ip())

def solve():
	(n, x) = ipl()
	a = ipl()
	print(1 if x in a else max(2, ceil(x / max(a))))
for _ in range(ipn()):
	solve()


from math import *
T = int(input())
for i in range(T):
	inp = list(map(int, input().split(' ')))
	n = inp[0]
	m = inp[1]
	arr = list(map(int, input().split(' ')))
	Max = -1
	flag = 0
	for j in arr:
		Max = max(Max, j)
		if j == m:
			flag = 1
			break
	if flag == 1:
		print(1)
	else:
		count = ceil(m / Max)
		if count == 1 and Max > m:
			count += 1
		print(count)


from math import ceil
for _ in range(int(input())):
	(n, x) = (int(x) for x in input().strip().split(' '))
	L = [int(x) for x in input().strip().split(' ')]
	m = max(L)
	for e in L:
		if e == x:
			print(1)
			break
	else:
		print(max(2, ceil(x / m)))


def func(x, l, n):
	count1 = 0
	if x > 2 * l[n - 1]:
		d = x // l[n - 1]
		count1 += d - 1
		x -= (d - 1) * l[n - 1]
	if x > l[n - 1]:
		count1 += 2
		x = 0
	if x in l:
		count1 += 1
	elif x > 0:
		count1 += 2
	return count1
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	l.sort()
	print(func(x, l, n))


import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
import string

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None
		self.BUFSIZE = 8192

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def get_int():
	return int(input())

def get_ints():
	return list(map(int, input().split(' ')))

def get_int_grid(n):
	return [get_ints() for _ in range(n)]

def get_str():
	return input().strip()

def get_strs():
	return get_str().split(' ')

def flat_list(arr):
	return [item for subarr in arr for item in subarr]

def yes_no(b):
	if b:
		return 'YES'
	else:
		return 'NO'

def binary_search(good, left, right, delta=1, right_true=False):
	limits = [left, right]
	while limits[1] - limits[0] > delta:
		if delta == 1:
			mid = sum(limits) // 2
		else:
			mid = sum(limits) / 2
		if good(mid):
			limits[int(right_true)] = mid
		else:
			limits[int(~right_true)] = mid
	if good(limits[int(right_true)]):
		return limits[int(right_true)]
	else:
		return False

def prefix_sums(a):
	p = [0]
	for x in a:
		p.append(p[-1] + x)
	return p

def solve_a():
	(n, d) = get_ints()
	a = get_ints()
	i = 1
	while d > 0 and i < n:
		e = min(a[i] * i, d)
		a[0] += e // i
		a[i] -= e // i
		d -= e
		i += 1
	return a[0]

def solve_b():
	(n, x) = get_ints()
	a = get_ints()
	m = max(a)
	if x in a:
		return 1
	elif x < m:
		return 2
	else:
		return x // m + int(x % m > 0)
t = get_int()
for _ in range(t):
	print(solve_b())


def foo():
	(n, x) = list(map(int, input().split()))
	jumps = list(map(int, input().split()))
	if x in jumps:
		print(1)
	else:
		furthest = max(jumps)
		if x < furthest:
			print(2)
		elif x % furthest > 0:
			print(x // furthest + 1)
		else:
			print(x // furthest)
t = int(input())
for i in range(t):
	foo()


from bisect import *
from math import *
t = int(input())
for i in range(t):
	(n, x) = input().split()
	n = int(n)
	x = int(x)
	arr = list(map(int, input().split()))
	a = max(arr)
	if x % a == 0:
		ans = x // a
	elif x > a:
		ans = x // a + 1
	else:
		flag = False
		for j in arr:
			if x == j:
				ans = 1
				flag = True
				break
		if flag == False:
			ans = 2
	print(ans)


has_tests = True

def solve_case():
	(n, x) = get([int])
	jumps = get([int])
	if x in jumps:
		return 1
	max_jump = max(jumps)
	if x % max_jump == 0:
		return x // max_jump
	if max_jump > x:
		return 2
	return x // max_jump + 1

def get(x, times=None):
	if times is not None:
		return [get(x, times=None) for _ in range(times)]
	if isinstance(x, list):
		return list(map(x[0], input().strip().split()))
	return x(input().strip())
if has_tests:
	for _ in range(get(int)):
		print(solve_case())
else:
	solve_case()


import sys
import math
read = lambda : list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	(n, x) = read()
	a = read()
	a.sort()
	ans = -1
	for i in range(n - 1, -1, -1):
		if a[i] > x:
			ans = 2
		elif a[i] == x:
			ans = 1
		else:
			break
	if ans == -1:
		ans = math.ceil(x / a[n - 1])
	print(ans)


def calc(x, a):
	a.sort(reverse=True)
	res = float('Inf')
	a_set = set(a)
	for (i, l) in enumerate(a):
		(n, m) = divmod(x, l)
		if m == 0:
			res = min(res, n)
		elif n == 0:
			res = min(2, res)
		else:
			res = min(res, n + 1)
	return res
N = int(input())
cases = []
for _ in range(N):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	cases.append((x, a))
for (x, a) in cases:
	print(calc(x, a))


tests = int(input())
for _ in range(tests):
	(n, d) = [int(i) for i in input().split()]
	fav = list(map(int, input().split()))
	maxi = max(fav)
	if d in fav:
		print(1)
	elif maxi > d:
		print(2)
	elif d % maxi == 0:
		print(d // maxi)
	else:
		print(d // maxi + 1)


import sys
from math import ceil
read = lambda : list(map(int, sys.stdin.readline().strip().split()))
for i in range(int(input())):
	(n, x) = read()
	a = set(read())
	if x in a:
		print(1)
		continue
	m = max(a)
	print(max(2, ceil(x / m)))


def ii():
	return int(input())

def ai():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())
for _ in range(ii()):
	(n, d) = mi()
	fav_dis = ai()
	max_fav_dis = max(fav_dis)
	if d in fav_dis:
		print(1)
		continue
	a = d // max_fav_dis + 1
	steps = a if d % max_fav_dis else a - 1
	print(max(2, steps))


for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 0
	a.sort()
	a1 = set(a)
	if x % a[-1] == 0:
		print(x // a[-1])
	elif x // a[-1] > 1:
		print(x // a[-1] + 1)
	elif x in a1:
		print(1)
	else:
		print(2)


l = int(input())
i = 0
for _ in range(l):
	(n, x) = list(map(int, input().split()))
	ll = list(map(int, input().split()))
	llmax = max(ll)
	if x in ll:
		print(1)
	elif llmax > x:
		print(2)
	else:
		print((x - 1) // llmax + 1)


def main():
	t = int(input())
	for i1 in range(t):
		(x, n) = list(map(int, input().split()))
		a = list(map(int, input().split()))
		y = max(a)
		if n < y:
			if n in a:
				print(1)
			else:
				print(2)
		elif n // y == n / y:
			print(n // y)
		else:
			print(n // y + 1)
main()


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	s = [] + list(map(int, input().split()))
	if x in s:
		print(1)
	else:
		piska = (x + max(s) - 1) // max(s)
		if piska == 1:
			piska = 2
		print(piska)


def check(mid):
	return x - mid * m <= 2 * m
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = 0
	ans = -1
	for i in range(n):
		m = max(a[i], m)
		if a[i] == x:
			ans = 1
			break
	if ans == 1:
		print(ans)
	elif x % m == 0:
		print(x // m)
	else:
		l = -1
		r = 10 ** 9 + 1
		while r - l > 1:
			mid = (l + r) // 2
			if check(mid):
				r = mid
			else:
				l = mid
		print(r + 2)


t = int(input())
while t > 0:
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	m = max(arr)
	if x in arr:
		print(1)
	else:
		print(max(2, (x + m - 1) // m))
	t -= 1


import sys
t = int(input())
g = sys.stdin.readlines()
y = 0
for i in range(t):
	(n, x) = map(int, g[y].split())
	y += 1
	a = list(map(int, g[y].split()))
	y += 1
	m = max(a)
	k = (x - 1) // m + 1
	if x in a:
		print(1)
	else:
		if m > x and k == 1:
			k = 2
		print(k)


import collections
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	v = collections.Counter(a)
	ans = k + 2
	for i in range(n):
		if k % a[i] == 0:
			ans = min(ans, k // a[i])
		else:
			ans = min(ans, max(0, k // a[i] - 1) + 2)
	print(ans)


def ceil_div(a, b):
	if a % b:
		return a // b + 1
	return a // b

def solve():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 10 ** 18
	for i in a:
		if ceil_div(x, i) <= 1:
			if x % i:
				ans = min(ans, 2)
			else:
				ans = min(ans, 1)
		else:
			ans = min(ans, ceil_div(x, i))
	print(ans)
t = int(input())
for _ in range(t):
	solve()


from sys import stdin, stdout
import math
for _ in range(int(stdin.readline())):
	(n, x) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	if x in a:
		stdout.write('1\n')
	else:
		a.sort(reverse=True)
		if x % a[0] == 0:
			stdout.write(str(x // a[0]) + '\n')
		else:
			f = a[0] > x
			y = f * 2 + (1 - f) * math.ceil(x / a[0])
			stdout.write(str(y) + '\n')


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	(n, x) = num_input()
	arr = set(list_input())
	if x in arr:
		print(1)
	else:
		print(max(2, math.ceil(x / max(arr))))
t = int(input())
for _ in range(t):
	solve()


T = int(input())
while T != 0:
	T -= 1
	(n, m) = map(int, input().split())
	arr = [int(x) for x in input().split()]
	ans = 0
	for i in arr:
		if i == m:
			ans = 1
			break
	if ans != 1:
		arr.sort()
		for i in reversed(arr):
			if i > m:
				ans = 2
				break
			elif m % i == 0:
				ans = m // i
				break
			else:
				ans = int(m // i) + 1
				break
	print(ans)


import math
for _ in range(int(input())):
	(n, x) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	m = max(arr)
	t = 0
	t += math.ceil(max(0, x - 2 * m) / m)
	x -= t * m
	if x != 0:
		if x in arr:
			t += 1
		else:
			t += 2
	print(t)


testCases = int(input())
for i1 in range(testCases):
	(x, n) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	y = max(a)
	if n <= y:
		if n in a:
			print(1)
		else:
			print(2)
	elif n // y == n / y:
		print(n // y)
	else:
		print(n // y + 1)


mas = list(map(int, input().split()))
t = mas[0]
for j in range(t):
	mas = list(map(int, input().split()))
	n = mas[0]
	x = mas[1]
	lst = list(map(int, input().split()))
	maxa = lst[0]
	ok1 = False
	ok2 = False
	for i in lst:
		if i > maxa:
			maxa = i
		if i == x:
			ok1 = True
		if i > x:
			ok2 = True
	if ok1:
		print(1)
	elif ok2:
		print(2)
	else:
		s = x // maxa
		if x % maxa != 0:
			s += 1
		print(s)


import math
q = int(input())
for x in range(q):
	(n, d) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	if d in l:
		print(1)
	elif d < 2 * max(l):
		print(2)
	else:
		print(math.ceil(d / max(l)))


cases = int(input())
for _ in range(cases):
	(n, x) = [int(i) for i in input().split(' ')]
	hops = [int(i) for i in input().split(' ')]
	maxHop = max(hops)
	if x in hops:
		print(1)
		continue
	if maxHop == x:
		print(1)
	elif maxHop > x:
		print(2)
	elif x % maxHop == 0:
		print(x // maxHop)
	else:
		print(x // maxHop + 1)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	(n, x) = map(int, sys.stdin.readline().split(' '))
	a = list(map(int, sys.stdin.readline().split(' ')))
	ans = mod
	for aa in a:
		v = x // aa
		if x % aa == 0:
			ans = min(ans, v)
		else:
			if v > 0:
				v -= 1
			ans = min(ans, v + 2)
	print(ans)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


import array
import math
import os
import random
import re
import sys
k = input()
t = int(k)
for iii in range(0, t, 1):
	ar1 = array.array('l', [])
	aaa = array.array('l', [])
	ar2 = array.array('l', [])
	ar1 = [int(w) for w in input().split()]
	n = int(ar1[0])
	x = int(ar1[1])
	ar2 = [int(w) for w in input().split()]
	ar2.sort()
	kk = int(ar2[n - 1])
	cc = int(x / kk)
	if x % kk == 0:
		print(cc)
	elif cc == 0:
		if x in ar2:
			print('1')
		else:
			print('2')
	else:
		print(cc + 1)


t = int(input())
for _ in range(t):
	(n, x) = input().strip().split(' ')
	(n, x) = (int(n), int(x))
	arr = list(map(int, input().strip().split(' ')))
	arr.sort()
	max_jump = arr[-1]
	if x in arr:
		print(1)
	elif x % max_jump == 0:
		print(x // max_jump)
	elif max_jump > x:
		print(2)
	else:
		print(x // max_jump + 1)


for i in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	ans = 100000000000
	for i in range(n):
		if l[i] > x:
			ans = min(ans, 2)
			continue
		if x % l[i] == 0:
			ans = min(ans, x // l[i])
		else:
			ans = min(ans, x // l[i] + 1)
		if 2 * l[i] >= x:
			ans = min(ans, 2)
	print(ans)


import sys
from math import gcd, ceil, floor, sqrt
import heapq
from collections import defaultdict

def solve():
	fastinp = lambda : sys.stdin.readline().split(' ')
	inp = lambda : input().split(' ')
	ml = lambda x, y=int: list(map(y, x))
	t = int(input())
	for _ in range(t):
		res = float('inf')
		(n, x) = ml(inp())
		arr = ml(inp())
		for i in range(n):
			calc = (arr[i] + x - 1) // arr[i]
			if arr[i] > x:
				calc = 2
			res = min(res, calc)
		print(res)
solve()


from math import ceil
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = [int(j) for j in input().split()]
	if x in arr:
		print(1)
		continue
	ma = max(arr)
	if ma > x:
		print(2)
	else:
		print(ceil(x / ma))


from math import ceil
t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	maxx = max(a)
	if a.count(x):
		print(1)
	else:
		ans = max(2, ceil(x / maxx))
		print(ans)


from math import ceil
from collections import defaultdict as dd
t = int(input())
while t:
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	mx = max(l)
	if x in l:
		res = 1
	elif mx >= x / 2:
		res = 2
	else:
		res = ceil(x / mx)
	print(res)
	t -= 1


from math import ceil
t = int(input())
while t > 0:
	(n, m) = map(int, input().split())
	a = [int(i) for i in input().split()]
	ma = 1000000000000
	for i in a:
		if m % i != 0:
			te = max(2, ceil(m / i))
		else:
			te = ceil(m / i)
		ma = min(ma, te)
	print(ma)
	t -= 1


n = int(input())
for i in range(n):
	(a, d) = map(int, input().split())
	s = list(map(int, input().split()))
	s.sort(reverse=True)
	if d % s[0] == 0:
		print(d // s[0])
	else:
		w = d // s[0] + 1
		if d < s[0]:
			t = 0
			while d < s[t]:
				t += 1
				if t == a:
					break
			if t < a and s[t] == d:
				w = 0
			w += 1
		print(w)


t = int(input())
for _ in range(t):
	(n, x) = (int(i) for i in input().split())
	f = [int(i) for i in input().split()]
	ans = 0
	if x in f:
		ans = 1
	else:
		m = max(f)
		ans = (x + m - 1) // m
		ans = max(ans, 2)
	print(ans)


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	st2 = 0
	if x in a:
		print(1)
		continue
	mx = max(a)
	if mx > x:
		st2 = 2
	else:
		st2 = math.ceil(x / mx)
	print(st2)


t = int(input())
import math
for _ in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	l_ = set(l)
	if x in l_:
		print(1)
		continue
	y = max(l)
	if 2 * y >= x:
		print(2)
	else:
		ans = math.ceil((x - 2 * y) / y) + 2
		print(ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = I()
	rr = []
	for _ in range(t):
		(n, x) = LI()
		a = LI()
		if x in a:
			rr.append(1)
		else:
			m = max(a)
			if m > x:
				rr.append(2)
			else:
				rr.append((x + m - 1) // m)
	return JA(rr, '\n')
print(main())


from math import *
from collections import *
from operator import itemgetter
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
t = ii()
for _ in range(t):
	(n, d) = iia()
	a = iia()
	x = max(a)
	if d in a:
		print(1)
	elif d < x:
		print(2)
	elif d % x == 0:
		print(d // x)
	else:
		print(d // x + 1)


import sys
import math
import itertools
import functools
import collections
import operator

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
arr = []
t = ii()
for _ in range(t):
	(n, x) = mi()
	a = li()
	max_ = max(a)
	if x in a:
		arr.append(1)
	elif max_ > x:
		arr.append(2)
	else:
		arr.append(math.ceil(x / max_))
print(*arr, sep='\n')


from math import ceil
t = int(input())
for i in range(t):
	(n, x) = input().split()
	n = int(n)
	x = int(x)
	mx = -1.0
	l = input().split()
	l = list(map(float, l))
	ans = 2
	for a in l:
		if a == float(x):
			ans = 1
		mx = max(a, mx)
	if ans != 1:
		ans = max(ans, int(ceil(x / mx)))
	print(ans)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def hop():
	for _ in range(t):
		(n, dis) = [int(x) for x in input().split()]
		(*a,) = [int(x) for x in input().split()]
		a.sort()
		biggest = float('inf')
		for i in range(n):
			rem = dis % a[n - i - 1]
			quo = dis // a[n - i - 1]
			if rem == 0:
				biggest = min(quo, biggest)
			elif rem != dis:
				biggest = min(biggest, quo + 1)
			else:
				biggest = min(biggest, quo + 2)
		yield biggest
t = int(input())
ans = hop()
print(*ans, sep='\n')


import os
from io import BytesIO, IOBase
import sys

def main():
	for t in range(int(input())):
		(n, x) = map(int, input().split())
		a = set(map(int, input().split()))
		b = max(a)
		if x in a:
			print(1)
		elif x % b == 0:
			print(x // b)
		else:
			c = x // b
			if c != 0:
				print(c + 1)
			else:
				print(2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	temp = set(arr)
	maxi = max(arr)
	if x in temp:
		print(1)
	elif x > maxi:
		print((x + maxi - 1) // maxi)
	else:
		print(2)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	a = sorted(a, reverse=True)
	ans = x // a[0]
	if ans >= 1:
		if x % a[0] != 0:
			ans += 1
	else:
		for i in range(n):
			if a[i] == x:
				ans = 1
				break
		else:
			ans = 2
	print(ans)


from collections import defaultdict

def one():
	return int(input())

def more():
	return map(int, input().split())

def lis():
	return list(map(int, input().split()))

def st():
	return input()

def check(x, R):
	if x % R == 0:
		return x // R
	else:
		c = x // R + 1
		if c == 1:
			return c + 1
		else:
			return c
for _ in range(one()):
	(n, x) = more()
	l = lis()
	l.sort()
	ind = -1
	m = check(x, l[ind])
	ind -= 1
	while ind >= -len(l) and l[ind] >= x:
		m = min(m, check(x, l[ind]))
		ind -= 1
	print(m)


t = int(input())
for _ in range(t):
	(n, xx) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	a = set(a)
	maxA = max(a)
	if xx in a:
		print(1)
	elif xx < maxA:
		print(2)
	else:
		ans = xx // maxA
		if xx // maxA * maxA < xx:
			ans += 1
		print(ans)


t = int(input())
for tt in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 10 ** 20
	for i in a:
		ans = min(ans, 2 if i > x else x // i if x % i == 0 else x // i + 1)
	print(ans)


t = int(input())
for you in range(t):
	l = input().split()
	n = int(l[0])
	x = int(l[1])
	l = input().split()
	li = [int(i) for i in l]
	if x in li:
		print(1)
		continue
	z = max(li)
	lelo = (x + z - 1) // z
	if lelo == 1:
		print(2)
	else:
		print(lelo)


import string

def main():
	(n, x) = map(int, input().split())
	lst = list(map(int, input().split()))
	lst = list(reversed(sorted(lst)))
	smallest = 2
	step = 0
	if x <= lst[0]:
		for i in lst:
			if x == i:
				print(1)
				return
		print(2)
		return
	steps = x // lst[0]
	if x % lst[0] > 0:
		steps += 1
	print(steps)
t = int(input())
for i in range(t):
	main()


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
S = lambda : input().strip()
mod = 1000000007
for i in range(I()):
	(n, x) = li()
	a = li()
	m = max(a)
	k = -1
	if x in a:
		print(1)
		continue
	if m > x:
		print(2)
		continue
	print(int(math.ceil(x / m)))


import sys
cases = int(input())
for t in range(cases):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	a = sorted(a)
	mv = sys.maxsize
	for i in a:
		left = x % i
		if left == 0:
			mv = min(mv, x // i)
		else:
			mv = min(mv, max(1, x // i) + 1)
	print(mv)


from math import *
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	ls = [int(x) for x in input().split()]
	if x in ls:
		print('1')
	else:
		print(max(2, ceil(x / max(ls))))


import math, collections, sys
input = sys.stdin.readline

def case():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	d = set(a)
	a.sort(reverse=True)
	ans = 10 ** 20
	for i in a:
		s = x // i
		rem = x % i
		if rem == 0:
			ans = min(ans, s)
		elif s:
			ans = min(ans, s + 1)
		else:
			ans = min(ans, 2)
	print(ans)
for _ in range(int(input())):
	case()


for _ in range(int(input())):
	(n, x) = [int(__) for __ in input().split()]
	a = [int(___) for ___ in input().split()]
	if x in a:
		print(1)
		continue
	shit = max(a)
	if shit > x:
		print(2)
	elif x % shit == 0:
		print(x // shit)
	else:
		print(x // shit + 1)


kl = int(input())
for l in range(kl):
	(n, d) = [int(i) for i in input().split()]
	mx = 0
	pr = 0
	for i in input().split():
		i = int(i)
		mx = max(mx, i)
		if i == d:
			pr = 1
	if mx > d:
		if pr:
			print(1)
		else:
			print(2)
	elif d % mx == 0:
		print(d // mx)
	else:
		print(d // mx + 1)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = [int(i) for i in input().split()]
	a = sorted(a, reverse=True)
	if x in a:
		print(1)
	elif 2 * a[0] < x:
		if x % a[0] == 0:
			print(x // a[0])
		else:
			print(x // a[0] + 1)
	else:
		print(2)


def read():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, x, a)

def solve(n, x, a):
	best = 10 ** 10
	for ai in a:
		if x % ai == 0:
			best = min(best, x // ai)
		elif ai < x:
			best = min(best, x // ai + 1)
		else:
			best = min(best, 2)
	return best
for t in range(int(input())):
	result = solve(*read())
	print(result)


from math import ceil
p = int(input())
for _ in range(p):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	if k in l:
		print('1')
	elif ceil(k / max(l)) > 1:
		print(ceil(k / max(l)))
	else:
		print('2')


from math import ceil
t = input()
t = int(t)
for i in range(0, t):
	(n, x) = input().split()
	(n, x) = (int(n), int(x))
	a = input().split()
	for (b, c) in enumerate(a):
		a[b] = int(c)
	a.sort(reverse=True)
	if x in a:
		print(1)
		continue
	elif a[0] > x:
		print(2)
	else:
		print(ceil(x / a[0]))


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	arr = list(map(int, input().split()))
	if d in arr:
		print('1')
	else:
		maxe = max(arr)
		print(max(2, (d + maxe - 1) // maxe))


from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time

def I():
	return int(input())

def MI():
	return map(int, input().split())

def S():
	return input()

def MS():
	return map(str, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def StoI():
	return [ord(i) - 97 for i in input()]

def ItoS(nn):
	return chr(nn + 97)

def input():
	return sys.stdin.readline().rstrip()

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = {False: 'No', True: 'Yes'}
MOD = 10 ** 9 + 7
inf = float('inf')
IINF = 10 ** 10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False

def distance(x1, y1, x2, y2):
	return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)

def solve(T):
	(n, x) = MI()
	a = LI()
	ans = 10 ** 19
	for i in range(n):
		if x % a[i] == 0:
			ans = min(ans, x // a[i])
		elif x < a[i]:
			ans = min(ans, 2)
		else:
			n = x // a[i]
			n -= 1
			ans = min(ans, n + 2)
	print(ans)

def main():
	T = I()
	for i in range(T):
		solve(T)
main()


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))
mo = 1000000007
for _ in range(inn()):
	(n, x) = value()
	a = arr()
	a.sort(reverse=True)
	ans = 1000000000
	d = {i: 1 for i in a}
	for i in range(n):
		if x % a[i] == 0:
			ans = min(ans, x // a[i])
		else:
			res = x - 2 * a[i]
			if res > 0:
				val = res // a[i] + 1
			else:
				val = 0
			if x - val in d:
				ans = min(ans, val + 1)
			else:
				ans = min(ans, val + 2)
	print(ans)


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = [int(i) for i in input().split()]
	a.sort()
	ans = 0
	if d in a:
		print(1)
	else:
		m = max(a)
		ans = max(2, (d + m - 1) // m)
		print(ans)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = [*map(int, input().split())]
	print(min(((x + i - 1) // i if i <= x else 2 for i in a)))


def customer(l, x, n):
	val = max(l)
	if x in l:
		return 1
	return max(2, (x + val - 1) // val)
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	queries = list(map(int, input().split()))
	print(customer(queries, x, n))


for _ in range(int(input())):
	f = 0
	(n, x) = arr = map(int, input().split())
	fav = list(map(int, input().split()))
	f = max(fav)
	if f == x or x in fav:
		print(1)
	else:
		print(max(2, (x + f - 1) // f))


lista = []
a = int(input())
for b in range(0, a):
	g = 0
	e = 0
	c = input().split()
	c1 = int(c[0])
	c2 = int(c[1])
	d = input().split()
	d = list(map(int, d))
	d.sort()
	e = c2 / d[-1]
	if c2 in d:
		e = 1
		lista.append(1)
		continue
	e2 = int(e)
	if e > e2:
		e2 = e + 1
	f = max(e2, 2)
	lista.append(int(f))
for i in range(0, len(lista)):
	print(lista[i])


from math import ceil
t = int(input())
for tt in range(t):
	(n, x) = (int(i) for i in input().split())
	a = [int(i) for i in input().split()]
	print(1 if x in a else max(2, ceil(x / max(a))))


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	ans = math.ceil(x / max(arr))
	if ans == 1:
		fl = 0
		for i in arr:
			if x == i:
				fl = 1
				break
		if fl == 0:
			ans += 1
	print(ans)


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
for i in range(ii()):
	(n, x) = mi()
	a = li()
	a.sort()
	f = 0
	for i in range(n):
		if a[i] == x:
			f = 1
	mx = a[-1]
	if x % mx:
		ans = max(x // mx + 1, 2)
	else:
		ans = x // mx
	if f:
		print(1)
	else:
		print(ans)


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	flag = 0
	for i in a:
		if d == i:
			flag = 1
			break
	if flag:
		print(1)
		continue
	if a[-1] <= d:
		print((d + a[-1] - 1) // a[-1])
	else:
		print(2)


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	x = a[1]
	if x in b:
		print('1')
		continue
	big = max(b)
	print(max(2, (x + big - 1) // big))


from collections import defaultdict
from math import *
import os
import sys
from io import BytesIO, IOBase
from heapq import nlargest
from bisect import *
import copy
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
t = int(input())
while t:
	t -= 1
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	if x in arr:
		print('1')
	else:
		m = max(arr)
		if m > x:
			print('2')
		else:
			print(int(ceil(x / m)))


from math import ceil
t = int(input())
for test in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	r = x + 1
	for y in a:
		if y <= x:
			r = min(r, ceil(x / y))
		else:
			r = min(r, 2)
	print(r)


R = lambda : map(int, input().split())
(t,) = R()
exec(t * 'n,x=R();print(min((-1--x//y or x%y>0)+1for y in R()));')


from math import ceil
for t in range(int(input())):
	(n, x) = [int(i) for i in input().split()]
	l = [int(i) for i in input().split()]
	s = set(l)
	m = max(l)
	if x in s:
		print(1)
	elif m > x:
		print(2)
	else:
		print(ceil(x / m))


import sys
import bisect as bi
input = sys.stdin.readline
inf = int(10000000000.0)
t_ = int(input())
while t_:
	t_ -= 1
	(n, x) = map(int, input().split())
	lis = sorted(map(int, input().split()))
	check = bi.bisect_left(lis, x)
	g = 1 if check < n and lis[check] == x else 0
	if g:
		print(1)
	else:
		if check == n:
			check -= 1
		if check != 0 and lis[check - 1] + lis[check] >= x:
			print(2)
		else:
			ans = inf
			if x % lis[check] == 0:
				ans = min(ans, x // lis[check])
			if check != 0 and x % lis[check - 1] == 0:
				ans = min(ans, x // lis[check - 1])
			ans = min(ans, max(0, x - lis[check]) // lis[check] + 2)
			print(ans)


for t in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	mx = max(arr)
	mn = x
	if x in arr:
		print('1')
	elif mx < x / 2:
		for item in arr:
			if x % item == 0:
				if x // item < mn:
					mn = x // item
			elif x // item + 1 < mn:
				mn = x // item + 1
		print(mn)
	else:
		print('2')


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split(' '))
	arr = list(map(int, input().split(' ')))
	min_hop = 10 ** 9
	min_hop2 = 10 ** 9
	flag = 0
	max_el = arr[0]
	for i in arr:
		max_el = max(max_el, i)
		if i == x:
			flag = 1
	if flag:
		ans = 1
	elif max_el * 2 > x:
		ans = 2
	else:
		for i in arr:
			if x % i == 0:
				min_hop = min(min_hop, x // i)
			min_hop2 = min(min_hop2, (x - max_el) // i + 2)
		ans = min(min_hop, min_hop2)
	print(ans)


t = int(input())
for k in range(t):
	flag = True
	flag2 = True
	(n, x) = map(int, input().split())
	aSet = set(map(int, input().split()))
	sm = 0
	mx = max(aSet)
	mega = -1
	for i in sorted(aSet, reverse=True):
		if x % i == 0:
			mega = x // i
			break
	while flag:
		if x in aSet:
			if 0 < mega < sm + 1:
				print(mega)
			else:
				print(sm + 1)
			flag = False
		elif mx * 2 >= x:
			if 0 < mega < sm + 2:
				print(mega)
			else:
				print(sm + 2)
			flag = False
		elif flag2:
			sm = x // mx - 1
			x = x % mx + mx
			flag2 = False
		else:
			x -= mx
			sm += 1


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	count = 0
	for j in range(len(arr)):
		if arr[j] == x:
			print(1)
			count = 1
			break
	if count == 0:
		if max(arr) > x:
			print(2)
		else:
			print((x + max(arr) - 1) // max(arr))


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
cases = int(input())
for t in range(cases):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	a = sorted(a)
	mv = sys.maxsize
	for i in a:
		left = x % i
		if left == 0:
			mv = min(mv, x // i)
		else:
			mv = min(mv, max(1, x // i) + 1)
	print(mv)


test = int(input())
for i in range(test):
	a = list(map(int, input().split()))
	target = a[1]
	fav = list(map(int, input().split()))
	fav.sort(reverse=True)
	eleman = fav[0]
	liste = []
	if eleman > target:
		liste.append(2)
	else:
		pos = target // eleman
		liste.append(pos + 1)
	for i in fav:
		if i <= target and target % i == 0:
			liste.append(int(target / i))
			break
	result = min(liste)
	print(result)


MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
for _ in range(ii()):
	(n, d) = f()
	l = il()
	st = set(l)
	mx = max(l)
	ans = 0
	dv = d // mx
	if dv == 0:
		if d in st:
			ans = 1
		else:
			ans = 2
	else:
		ans = dv + (d % mx != 0)
	print(ans)


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	(n, d) = invr()
	a = inlt()
	if d in a:
		print(1)
	elif max(a) > d:
		print(2)
	else:
		print(-(-d // max(a)))


import math
t = int(input())
for w in range(t):
	(n, x) = (int(i) for i in input().split())
	l = sorted([int(i) for i in input().split()], reverse=True)
	a = 10000000000
	for i in l:
		if x < i:
			a = min(a, 2)
		elif x == i:
			a = 1
		else:
			a = min(a, math.ceil(x / i))
	print(a)


R = lambda : map(int, input().split())
(t,) = R()
exec(t * 'n,x=R();print(min((0--x//y,2)[y>x]for y in R()));')


t = int(input())
for o in range(0, t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	iss = False
	maxi = 0
	for i in range(0, n):
		if arr[i] == x:
			iss = True
		maxi = max(maxi, arr[i])
	hi = x // maxi
	if x % maxi != 0:
		hi += 1
		hi = max(hi, 2)
	if iss:
		print(1)
	else:
		print(hi)


t = int(input())
for ii in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	ans = 10 ** 10
	for i in range(n):
		if x < l[i]:
			ans = min(ans, 2)
		else:
			ans = min(ans, -(-x // l[i]))
	print(ans)


test = int(input())
s = []
for i in range(test):
	(n, d) = list(map(int, input().split(' ')))
	s = list(map(int, input().split(' ')))
	ans = 9999999999999
	for j in s:
		if d % j == 0:
			h = d / j
			if ans > h:
				ans = int(h)
		elif j > d:
			if ans > 2:
				ans = 2
		else:
			h = d / j + 1
			if ans > h:
				ans = int(h)
	print(ans)


def I():
	return list(map(int, input().split()))
for __ in range(int(input())):
	(n, x) = I()
	l = I()
	minHops = 1000000000000000000000000000
	for a in l:
		x2 = x
		if x2 % a == 0:
			minHops = min(x2 // a, minHops)
		else:
			minHops = min(max(1, x2 // a) + 1, minHops)
	print(minHops)


import math

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(sep=' '):
		return input().split(sep)

	@staticmethod
	def list_int(sep=' '):
		return list(map(int, input().split(sep)))

def solve():
	(n, x) = Read.list_int()
	a = Read.list_int()
	a.sort()
	for i in a:
		if i == x:
			print(1)
			return
	d = a[-1]
	if d > x:
		print(2)
		return
	print(math.ceil(x / d))
query_count = Read.int()
while query_count:
	query_count -= 1
	solve()


import math as mt
for tc in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	mi = 10 ** 9 + 7
	for i in range(n):
		if l[i] > x:
			mi = min(mi, 2)
		else:
			mi = min(mi, mt.ceil(x / l[i]))
	print(mi)


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		(n, m) = map(int, input().split())
		A = list(map(int, input().split()))
		if m in A:
			print(1)
		else:
			d = max(A)
			ans = max(2, (m + d - 1) // d)
			print(ans)
main()


def main():
	t = int(input())
	while t > 0:
		(n, x) = [int(x) for x in input().split()]
		arr = list(map(int, input().split()))
		hash = {}
		for i in range(n):
			hash[arr[i]] = 1
		arr.sort()
		cur = x
		hop = 0
		while 1:
			if hash.get(cur) or cur == 0:
				print(hop + 1)
				break
			elif arr[n - 1] * 2 >= cur:
				print(hop + 2)
				break
			else:
				div = int(cur / arr[n - 1])
				cur = cur - div * arr[n - 1]
				hop = hop + div
				hop = hop - 1
				cur = cur + arr[n - 1]
		t = t - 1
main()


t = int(input())
for _t in range(t):
	(n, x) = map(int, input().split())
	nums = list(map(int, input().split()))
	print(min(((x + m - 1) // m if m <= x else 2 for m in nums)))


from math import *

def binarySearch(arr, x, i):
	l = i
	r = len(arr) - 1
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def js(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] <= x:
			ans = m
			l = m + 1
		else:
			r = m - 1
	return ans

def jg(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] >= x:
			ans = m
			r = m - 1
		else:
			l = m + 1
	return ans

def ceil(a, b):
	if a % b == 0:
		return int(a / b)
	else:
		return a // b + 1
T = int(input())
for i in range(T):
	inp = list(map(int, input().split()))
	n = inp[0]
	m = inp[1]
	arr = list(map(int, input().split()))
	Max = -1
	flag = 0
	for j in arr:
		Max = max(Max, j)
		if j == m:
			flag = 1
			break
	if flag == 1:
		print(1)
	else:
		count = m // Max
		if m % Max != 0:
			count += 1
		if count == 1 and Max > m:
			count += 1
		print(count)


t = int(input())
for iii in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = -1
	flag = False
	flag1 = False
	for el in a:
		if mx < el <= x:
			mx = el
		if el == x:
			flag = True
		elif el > x:
			flag1 = True
	if flag:
		print(1)
	elif flag1:
		print(2)
	elif x % mx == 0:
		print(x // mx)
	else:
		print(x // mx + 1)


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 100000000000
	for j in a:
		if x % j == 0:
			ans = min(ans, x // j)
		else:
			ans = min(ans, max(2, x // j + 1))
	print(ans)


import sys
import math
from collections import defaultdict
from collections import deque
from itertools import combinations
from itertools import permutations
input = lambda : sys.stdin.readline().rstrip()
read = lambda : list(map(int, input().split()))
go = lambda : 1 / 0

def write(*args, sep='\n'):
	for i in args:
		sys.stdout.write('{}{}'.format(i, sep))
INF = float('inf')
MOD = int(1000000000.0 + 7)
YES = 'YES'
NO = 'NO'
for _ in range(int(input())):
	try:
		(n, x) = read()
		arr = read()
		m = max(arr)
		if x in arr:
			print(1)
		else:
			print(max(2, math.ceil(x / m)))
	except ZeroDivisionError:
		continue
	except Exception as e:
		print(e)
		continue


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	lis = list(map(int, input().split()))
	m = max(lis)
	if x in lis:
		print(1)
	elif m > x:
		print(2)
	elif x % m == 0:
		print(x // m)
	else:
		print(x // m + 1)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a = sorted(a)
	steps = 0
	f = 0
	for i in range(n - 1, -1, -1):
		if x >= a[i]:
			if x % a[i] == 0:
				if f == 0:
					steps = x // a[i]
				elif x // a[i] < steps:
					steps = x // a[i]
			elif f == 0:
				steps = x // a[i] + 1
			elif x // a[i] < steps:
				steps = x // a[i] + 1
			break
		elif f == 0:
			steps = 2
			f = 1
		elif steps > 2:
			steps = 2
	print(steps)


from math import ceil
for tc in range(int(input())):
	(n, x) = map(int, input().split(' '))
	a = list(map(int, input().split(' ')))
	if x in a:
		print(1)
	else:
		mx = max(a)
		if x > mx:
			print(ceil(x / mx))
		else:
			print(2)


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	(n, x) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	ans = (x + max(a) - 1) // max(a)
	if ans == 1 and x not in a:
		ans += 1
	print(ans)


from math import sqrt, ceil

def dist(x1, y1, x2, y2):
	return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = max(a)
	if x < m:
		if x in a:
			print(1)
		else:
			print(2)
	else:
		print(ceil(x / m))


import math
t = int(input())
while t:
	t += -1
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	ans = 0
	for i in l:
		if i == x:
			ans = 1
			break
	if ans:
		print(ans)
	else:
		print(max(2, math.ceil(x / max(l))))


from sys import *
input = stdin.readline
I = int
R = range
listInput = lambda : list(map(int, input().strip().split()))
lineInput = lambda : map(int, input().strip().split())
sJoin = lambda a, sep: '{}'.format(sep).join(a)
arrJoin = lambda a, sep: '{}'.format(sep).join(map(str, a))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	for i in range(5, int(math.sqrt(n) + 1), 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def main():
	for _ in R(I(input())):
		(n, d) = lineInput()
		arr = listInput()
		m = max(arr)
		if d in arr:
			print(1)
		else:
			print(max(2, (d + m - 1) // m))
main()


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(N, X) = MAP()
	A = LIST()
	if A.count(X):
		print(1)
		continue
	ans = max(ceil(X, max(A)), 2)
	print(ans)


for t in range(int(input())):
	(n, x) = map(int, input().split())
	A = list(map(int, input().split()))
	A.sort()
	from _collections import defaultdict
	ex = defaultdict(int)
	for i in A:
		ex[i] = 1
	Steps = []
	if ex[x] == 1:
		print('1')
		continue
	while len(A) > 0:
		c = A.pop()
		if c > x or 2 * c >= x:
			Steps.append(2)
			continue
		elif c == x:
			Steps.append(1)
			break
		else:
			ans = x // c
			ans -= 1
			remain = x % c + c
			if remain != 0:
				if ex[remain] == 1:
					ans += 1
				elif c > x or 2 * c >= remain:
					ans += 2
			Steps.append(ans)
	print(min(Steps))


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	s = set(map(int, input().split()))
	if x in s:
		print(1)
	else:
		print(math.ceil(max(2, x / max(s))))


import sys
import math

def main():
	for _ in range(int(sys.stdin.readline())):
		(n, d) = map(int, sys.stdin.readline().split())
		l = [int(y) for y in sys.stdin.readline().split()]
		fans = []
		for m in l:
			if d % m != 0:
				ans = d / m
				ans = math.ceil(ans)
				fans.append(max(ans, 2))
			else:
				fans.append(d // m)
		print(min(fans))
main()


t = int(input())
for i in range(t):
	(n, s) = map(int, input().split())
	mass = [int(x) for x in input().split()]
	Min = 10000000000.0
	for j in range(n):
		x = s // mass[j]
		d = s % mass[j]
		if x == 0:
			x += 2
		elif d != 0:
			x += 1
		if Min > x:
			Min = x
	print(Min)


try:
	tc = int(input())
except:
	exit()
import math
for _ in range(tc):
	(n, x) = map(int, input().split())
	lis = list(map(int, input().split()))
	res = 0
	for i in range(n):
		if lis[i] == x:
			res = 1
	if res == 1:
		print(res)
		continue
	else:
		lis.sort()
		if lis[n - 1] * 2 >= x:
			res = 2
		else:
			x -= 2 * lis[n - 1]
			res += math.ceil(x / lis[n - 1]) + 2
		print(res)


t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	b = set(a)
	c = max(a)
	if x % c == 0:
		print(x // c)
	elif x % c in b:
		print(x // c + 1)
	else:
		print(max(x // max(a) - 1, 0) + 2)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	hop = max(a)
	if x % hop == 0:
		ans = x // hop
	elif x // hop > 0:
		ans = x // hop + 1
	elif x in a:
		ans = 1
	else:
		ans = 2
	print(ans)


from math import ceil
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = sorted(list(map(int, input().split())))
	print(1 if x in a else max(ceil(x / a[-1]), 2))


t = int(input())
for _ in range(0, t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = int(1000000000.0)
	for i in a:
		if i > x:
			ans = min(ans, 2)
		else:
			ans = min(ans, (x + i - 1) // i)
	print(ans)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def solve():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	max_a = max(a)
	ans = float('inf')
	for ai in a:
		for nx in [x - ai, x + ai]:
			if nx < 0:
				nx = -nx
			tmp = 1 - 2 * (-nx // (2 * max_a))
			ans = min(ans, tmp)
	tmp = -2 * (-x // (2 * max_a))
	ans = min(ans, tmp)
	print(ans)
t = int(input())
for i in range(t):
	solve()


from math import *
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.count(d) == 1:
		print(1)
	else:
		a.sort(reverse=True)
		k = ceil(d / a[0])
		print(max(2, k))


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
		continue
	a.sort(reverse=True)
	m = max(a)
	y = x / m
	y1 = int(y)
	if y == y1:
		print(y1)
	elif y1 == 0:
		print(2)
	else:
		print(y1 + 1)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(n, x) = inputnums()
	a = inputlist()
	a.sort()
	ans = 0
	for i in range(n):
		if a[i] == x:
			ans = 1
			break
	if ans == 1:
		print(1)
		continue
	if a[i] > x:
		print(2)
		continue
	cur = x // a[n - 1]
	for i in range(n):
		if x // a[i] == cur and x % a[i] == 0:
			ans = cur
	if ans == cur:
		print(cur)
	else:
		print(cur + 1)


for _ in range(int(input())):
	(n, x) = list(map(int, input().split()))
	a = sorted(list(map(int, input().split())), reverse=True)
	res = 0
	if x < a[0]:
		res = 1 if x in a else 2
	else:
		(b, c) = divmod(x, a[0])
		res = b + (1 if c > 0 else 0)
	print(res)


from math import ceil
t = int(input())
a = []
b = []
while t > 0:
	(n, m) = map(int, input().split())
	b = list(map(int, input().split()))
	b.sort()
	f = False
	for i in range(0, n):
		if m == b[i]:
			f = True
	if b[-1] > m and f == False:
		print(2)
	elif m == b[-1] or f == True:
		print(1)
	else:
		print(ceil(m / b[-1]))
	t -= 1


T = int(input().strip())
for i in range(T):
	(n, x) = map(int, input().strip().split())
	nums = [int(i) for i in input().strip().split()]
	num_set = set(nums)
	ans = 10 ** 9 + 10
	for i in range(n):
		temp_ans = x // nums[i]
		remain = x - temp_ans * nums[i]
		if remain == 0:
			pass
		elif nums[i] > x:
			temp_ans = 2
		else:
			temp_ans += 1
		if temp_ans < ans:
			ans = temp_ans
	print(ans)


t = int(input())
for i in range(t):
	l = input()
	l = l.split()
	n = int(l[0])
	x = int(l[1])
	l = input()
	l = l.split()
	ans = 0
	for i in range(len(l)):
		l[i] = int(l[i])
	l = sorted(l)
	i = l[-1]
	if x == i:
		ans += 1
		print(ans)
	elif x <= 2 * i:
		for i in l[::-1]:
			if x == i:
				print(ans + 1)
				break
			elif i < x:
				ans += 2
				print(ans)
				break
			elif i == l[0]:
				ans += 2
				print(ans)
				break
	else:
		ans += (x - 2 * i) // i
		if (x - 2 * i) % i == 0:
			ans += 2
		else:
			ans += 3
		print(ans)


import sys
from math import floor, ceil
import bisect
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 30
MOD = 10 ** 7
for _ in range(int(ri())):
	(n, x) = Ri()
	a = Ri()
	maxx = max(a)
	s = set(a)
	s.add(0)
	if x in s:
		print(1)
	elif maxx > x:
		print(2)
	else:
		flag = False
		for i in s:
			if x - i in s:
				flag = True
				print(2)
				break
		if not flag:
			cnt = x // maxx - 1
			x = maxx + x % maxx
			flag = False
			for i in s:
				if i == x:
					flag = True
					print(cnt + 1)
					break
			if not flag:
				for i in s:
					if x - i in s:
						flag = True
						print(cnt + 2)
						break
			if not flag:
				print(cnt + 2)


testcases = int(input())
for j in range(testcases):
	from math import ceil
	values = list(map(int, input().split()))
	numfavs = values[0]
	distance = values[1]
	favnums = list(map(int, input().split()))
	if distance in favnums:
		print(1)
	else:
		maximum = max(favnums)
		if maximum < distance:
			print(ceil(distance / maximum))
		else:
			print(2)


t = int(input())
for _ in range(0, t):
	(n, x) = map(int, input().split())
	A = list(map(int, input().split()))
	A.sort()
	d = max(A)
	a = 0
	if x in A:
		a = 1
	else:
		a = max(2, (x + d - 1) // d)
	print(a)


from math import ceil
t = int(input())
for test in range(t):
	(n, x) = map(int, input().split())
	a = sorted(map(int, input().split()))
	if x in a:
		print(1)
		continue
	y = a[-1]
	print(max(2, ceil(x / y)))


t = int(input())
for loop in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	a.sort()
	if x >= a[-1]:
		if x % a[-1] == 0:
			print(x // a[-1])
		else:
			print(x // a[-1] + 1)
	elif x in a:
		print(1)
	else:
		print(2)


import sys
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = sys.maxsize
	for d in reversed(sorted(a)):
		q = x // d
		if q == 0:
			ans = min(ans, 2)
		else:
			rem = x % d
			if rem == 0:
				ans = min(ans, q)
			else:
				ans = min(ans, q + 1)
	print(ans)


from collections import Counter as C, defaultdict as D, deque as Q
from operator import itemgetter as I
from itertools import product as P, permutations as PERMUT
from bisect import bisect_left as BL, bisect_right as BR, insort as INSORT
from heapq import heappush as HPUSH, heappop as HPOP
from math import floor as MF, ceil as MC, gcd as MG, factorial as F, sqrt as SQRT, inf as INFINITY, log as LOG
from sys import stdin, stdout
INPUT = stdin.readline
PRINT = stdout.write
L = list
M = map

def Player1():
	print('')

def Player2():
	print('')

def Yes():
	PRINT('Yes\n')

def No():
	PRINT('No\n')

def IsPrime(n):
	for i in range(2, MC(SQRT(n)) + 1):
		if n % i == 0:
			return False
	return True

def Factors(x):
	ans = []
	for i in range(1, MC(SQRT(x)) + 1):
		if x % i == 0:
			ans.append(i)
			if x % (x // i) == 0:
				ans.append(x // i)
	return ans

def CheckPath(source, destination, g):
	visited = [0] * 101
	q = Q()
	q.append(source)
	visited[source] = 1
	while q:
		node = q.popleft()
		if node == destination:
			return 1
		for v in g[node]:
			if not visited[v]:
				q.append(v)
				visited[v] = 1
	return 0

def Sieve(n):
	prime = [1] * (n + 1)
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = 0
		p += 1
	primes = []
	for p in range(2, n + 1):
		if prime[p]:
			primes.append(p)
	return primes

def Prefix(a, n):
	p = []
	for i in range(n):
		if i == 0:
			p.append(a[0])
		else:
			p.append(p[-1] + a[i])
	return p

def Suffix(a, n):
	s = [0] * n
	for i in range(n - 1, -1, -1):
		if i == n - 1:
			s[i] = a[i]
		else:
			s[i] = s[i + 1] + a[i]
	return s

def Spf(n):
	spf = [0 for i in range(n)]
	spf[1] = 1
	for i in range(2, n):
		spf[i] = i
	for i in range(4, n, 2):
		spf[i] = 2
	for i in range(3, MC(SQRT(n)) + 1):
		if spf[i] == i:
			for j in range(i * i, n, i):
				if spf[j] == j:
					spf[j] = i
	return spf

def DFS(g, s, visited, ans):
	visited[s] = 1
	for (u, c) in g[s]:
		if visited[u]:
			continue
		if c == ans[s]:
			if c == 1:
				ans[u] = 2
			else:
				ans[u] = 1
		else:
			ans[u] = c
		DFS(g, u, visited, ans)

def lcm(a, b):
	return a * b // MG(a, b)

def Main():
	for _ in range(int(INPUT())):
		(n, x) = M(int, INPUT().split())
		a = L(M(int, INPUT().split()))
		if x in a:
			PRINT('%d\n' % 1)
		else:
			PRINT('%d\n' % max(2, MC(x / max(a))))
Main()


t = int(input())
for _ in range(t):
	(n, xx) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	a = set(a)
	maxA = max(a)
	if xx <= maxA:
		if xx in a:
			print(1)
		else:
			print(2)
		continue
	else:
		temp = xx // maxA
		xx -= maxA * temp
		ans = temp
		if xx != 0:
			ans += 1
		print(ans)


import math

def main_function():
	test_cases = range(int(input()))
	for test_case in test_cases:
		(n, x) = [int(i) for i in input().split(' ')]
		a = [int(u) for u in input().split(' ')]
		if x in a:
			print(1)
		else:
			z = math.ceil(x / max(a))
			if z == 1:
				print(2)
			else:
				print(z)
main_function()


import math
n = int(input())
for case in range(0, n):
	s = input()
	arr2 = s.split()
	n = int(arr2[0])
	x = int(arr2[1])
	s = input()
	arr2 = s.split()
	arr = []
	for i in arr2:
		arr.append(int(i))
	arr.sort(reverse=True)
	div = math.floor(x / arr[0])
	if x % arr[0] == 0:
		print(div)
	elif div != 0:
		print(div + 1)
	elif x in arr:
		print(1)
	else:
		print(2)


import math
t = int(input())
while t > 0:
	(n, x) = [int(ele) for ele in input().split()]
	a = [int(ele) for ele in input().split()]
	if x in a:
		print(1)
	else:
		maxi = max(a)
		if maxi > x / 2:
			print(2)
		else:
			print(math.ceil(x / maxi))
	t -= 1


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)
for xyz in range(0, int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	if x in l:
		print(1)
	else:
		a = 10000000000000
		for i in range(0, n):
			if x % l[i] == 0:
				a = min(a, x // l[i])
			elif l[i] >= x:
				a = min(a, 2)
			else:
				a = min(a, x // l[i] + 1)
		print(a)


for _ in range(int(input())):
	(n, x) = tuple(map(int, input().split()))
	favs = list(map(int, input().split()))
	mx = max(favs)
	if x % mx == 0:
		print(x // mx)
	elif x // mx == 0:
		if x in favs:
			print(1)
		else:
			print(2)
	else:
		print(x // mx + 1)


from sys import stdin

def solve():
	(n, x) = map(int, input().split())
	a = set(map(int, input().split()))
	summ = sum(a)
	maximal = max(a)
	if summ == x:
		return n
	if x in a:
		return 1
	if maximal > x:
		return 2
	if x % maximal == 0:
		return x // maximal
	return x // maximal + 1

def main():
	t = int(input())
	while t > 0:
		t -= 1
		print(solve())
main()


import sys
input = sys.stdin.readline
import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	A = list(map(int, input().split()))
	A.sort()
	for a in A:
		if a == x:
			print(1)
			break
	else:
		print(max(2, math.ceil(x / A[-1])))


from math import *

def binarySearch(arr, x, i):
	l = i
	r = len(arr) - 1
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def js(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] <= x:
			ans = m
			l = m + 1
		else:
			r = m - 1
	return ans

def jg(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] >= x:
			ans = m
			r = m - 1
		else:
			l = m + 1
	return ans

def ceil(a, b):
	if a % b == 0:
		return int(a / b)
	else:
		return a // b + 1
for i in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	if x in l:
		print(1)
	elif max(l) > x:
		print(2)
	else:
		print(ceil(x, max(l)))


import math
q = int(input())
for _ in range(q):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.__contains__(x):
		print(1)
	else:
		c = max(a)
		if c > x:
			print(2)
		else:
			print(math.ceil(x / c))


alph = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if a.count(x) != 0:
		print(1)
		continue
	a.sort(reverse=True)
	if a[0] > x:
		print(2)
		continue
	print(int(x % a[0] != 0) + x // a[0])


t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	l = [int(i) for i in input().split()]
	ans = 10000000001
	count = 10000000001
	pq = max(l)
	if x in l:
		ans = 1
	elif pq * 2 >= x:
		ans = 2
	elif x % pq != 0:
		count = x // pq + 1
	else:
		count = x // pq
	print(min(count, ans))


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	s = set(map(int, input().split()))
	MAX = max(s)
	if d in s:
		ans = 1
	elif d < MAX:
		ans = 2
	else:
		ans = (d + MAX - 1) // MAX
	print(ans)


import math
sp = lambda : list(map(int, input().split()))
si = lambda : int(input())
TESTCASES = int(input())
prints = []
for tc in range(TESTCASES):
	(n, x) = sp()
	a = sp()
	flag = False
	for dist in a:
		if dist == x:
			flag = True
			break
	if flag:
		prints.append('1')
		continue
	max_a = max(a)
	floordiv = x // max_a
	if floordiv * max_a != x:
		floordiv += 1
	if floordiv == 1:
		floordiv = 2
	prints.append(str(floordiv))
print('\n'.join(prints))


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	m = max(a)
	if x in a:
		print(1)
	elif x < m:
		print(2)
	else:
		print((x + m - 1) // m)


import sys
import bisect
from collections import deque

def no():
	print('NO')

def dist(z, c):
	return (z[0] - c[0]) * (z[0] - c[0]) + (z[1] - c[1]) * (z[1] - c[1])

def vec(z, c):
	return z[0] * c[1] - z[1] * c[0]

def pro(z, c):
	return [z[0] - c[0], z[1] - c[1]]

def main():
	(n, d) = [int(i) for i in sys.stdin.readline().split()]
	q = sorted([int(i) for i in sys.stdin.readline().split()], reverse=True)
	if d in q:
		print(1)
		return 0
	elif d < q[0]:
		print(2)
	else:
		print((d + q[0] - 1) // q[0])
for i in range(int(sys.stdin.readline())):
	main()


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	f = 0
	for i in l:
		if i == x:
			print(1)
			f = 1
			break
	if f == 0:
		if x % l[0] == 0:
			print(x // l[0])
		elif x <= 2 * l[0]:
			print(2)
		else:
			print(x // l[0] + 1)


t = int(input())
for q in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	if x in a:
		print(1)
	elif x % max(a) != 0:
		print(max(2, x // max(a) + 1))
	else:
		print(max(2, x // max(a)))


import sys
input = sys.stdin.readline
for r in range(int(input())):
	(n, x) = map(int, input().split(' '))
	a = set(map(int, input().split(' ')))
	go = max(a)
	anses = [(x // go, go)]
	for test in a:
		if x // test <= anses[0][0] + 1:
			anses.append((x // test, test))
	final = 10 ** 9
	for find in anses:
		ans = max(find[0] - 1, 0)
		u = x - ans * find[1]
		if u > 0 and ans == 0 and (u % find[1] != 0):
			ans = ans + 2
		elif u <= find[1]:
			ans = ans + 1
		else:
			ans = ans + 2
		if ans < final:
			final = ans
	print(final)


for _ in range(int(input())):
	(n, x) = list(map(int, input().strip().split()))
	array = list(map(int, input().strip().split()))
	if x in array:
		print(1)
		continue
	k = max(array)
	if k >= x / 2:
		print(2)
		continue
	ans = x // k
	if x % k == 0:
		print(ans)
	else:
		print(ans + 1)