#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, x, i, c = 0, f = 0, d = 2;
  cin >> n >> x;
  long long a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == x) f = 1;
    c = max(c, a[i]);
  }
  if (f == 1) {
    cout << "1" << endl;
    return;
  }
  if (x % c == 0) {
    c = x / c;
    c = max(c, d);
    cout << c << endl;
    return;
  }
  c = (x / c) + 1;
  c = max(c, d);
  cout << c << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
