#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long inv(long long x) {
  long long r = 1ll, t = x, k = MOD - 2ll;
  while (k) {
    if (k & 1ll) r = (long long)r * t % MOD;
    t = (long long)t * t % MOD;
    k >>= 1;
  }
  return r;
}
void min_self(int &a, int b) { a = min(a, b); }
int n, x;
vector<int> a;
void readIN() {
  cin >> n >> x;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++)
    if (a[i] == x) {
      cout << 1 << endl;
      return;
    }
  cout << max(2, (x + a[n - 1] - 1) / a[n - 1]) << endl;
}
void solve() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  int t;
  cin >> t;
  while (t--) {
    readIN();
    solve();
  }
  return 0;
}
