#include <bits/stdc++.h>
using namespace std;
const int cnst = 1e9 + 7;
bool IsQuery = true;
long long int q = 1, cnt;
void solve() {
  long long int c, r, b, g, o, e, p = 0, d, x, y, n, minm = cnst, maxm = -1,
                                  k = 1, sum = 0, ans = 0, l, flag = 0;
  string s, t;
  vector<long long int> a, v;
  map<long long int, long long int> m;
  cin >> n >> d;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == d) flag = 1;
  }
  maxm = *max_element(a.begin(), a.end());
  ans = d / maxm;
  if (flag) {
    cout << 1 << endl;
    return;
  }
  if (d % maxm != 0) ans += 1;
  if (ans == 1) ans++;
  cout << ans << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  if (IsQuery) cin >> q;
  for (int i = 0; i < q; i++) solve();
  return 0;
}
