#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 2e5 + 10;
int n, d;
int a[maxn];
map<int, bool> mp;
int main() {
  ios::sync_with_stdio(false);
  int _;
  cin >> _;
  while (_--) {
    mp.clear();
    cin >> n >> d;
    for (int i = 1; i <= n; i++) cin >> a[i], mp[a[i]] = true;
    sort(a + 1, a + 1 + n);
    if (mp[d])
      cout << 1 << endl;
    else
      cout << max(int(ceil(1.0 * d / a[n])), 2) << endl;
  }
  return 0;
}
