#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
int n, x;
int favourites[maxn];
void solve() {
  cin >> n >> x;
  bool found = false;
  int maxval = 0;
  for (int i = 1; i <= n; i++) {
    cin >> favourites[i];
    if (favourites[i] == x) found = true;
    maxval = max(maxval, favourites[i]);
  }
  if (found) {
    cout << "1\n";
    return;
  }
  if (maxval * 2 >= x) {
    cout << "2\n";
    return;
  }
  int result = ((x - 2 * maxval) + (maxval - 1)) / maxval;
  result += 2;
  cout << result << "\n";
  return;
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
}
