#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 1;
const long long mod = 1e9 + 7;
template <typename T>
istream &operator>>(istream &is, vector<T> &A);
void solve() {
  long long n, x;
  cin >> n >> x;
  vector<long long> arr(n);
  cin >> arr;
  sort(arr.begin(), arr.end());
  long long ans = 0;
  if (binary_search(arr.begin(), arr.end(), x))
    ans = 1;
  else
    ans = max(2LL, (x + arr[n - 1] - 1) / arr[n - 1]);
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  cin >> t;
  for (int I = 1; I <= t; I++) {
    solve();
  }
  return 0;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &A) {
  for (int i = 0; i < A.size(); i++) is >> A[i];
  return is;
}
