#include <bits/stdc++.h>
using namespace std;
template <typename T>
static ostream& operator<<(ostream& stream, const vector<T>& t);
template <typename T>
static istream& read(T, T, istream& = cin);
template <typename T>
static istream& operator>>(istream& stream, vector<T>& t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename T>
static istream& read(T b, T e, istream& stream) {
  for (T it = b; it != e; ++it) stream >> *it;
  return stream;
}
int __() {
  int n, x;
  cin >> n >> x;
  vector<int> a(n);
  cin >> a;
  sort((a).rbegin(), (a).rend());
  for (int y : a)
    if (y == x) return 1;
  int ans = (x + a[0] - 1) / a[0];
  ans = max(ans, 2);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(15);
  int t;
  cin >> t;
  for (int i = 1; i <= t; ++i) {
    cout << __() << '\n';
  }
}
