#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const double eps = 1e-8;
const int INF32 = 0x3f3f3f3f;
const long long INF64 = 0x3f3f3f3f3f3f3f3f;
const int mod = 998244353;
const unsigned long long mod2 = 1;
const int N = 2e5 + 5;
const int sz = (1 << 20);
int a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int q;
  cin >> q;
  while (q--) {
    int n, x, mx = 0;
    cin >> n >> x;
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
      if (a[i] == x) mx = INF32;
      mx = max(mx, a[i]);
    }
    if (mx == INF32)
      cout << 1 << '\n';
    else {
      int ans = x / mx;
      if (x % mx) ++ans;
      if (x < mx) ++ans;
      cout << ans << '\n';
    }
  }
  return 0;
}
