#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpll = vector<pll>;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (const auto &x : v) os << x << " ";
  return os;
}
void solve() {
  int n;
  ll x;
  cin >> n >> x;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  if (binary_search(a.begin(), a.end(), x)) {
    cout << 1 << endl;
    return;
  }
  ll big = a.back();
  ll ans = max(2ll, (x + big - 1) / big);
  cout << ans << endl;
}
int main(int argc, char const *argv[]) {
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) solve();
  return 0;
}
