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