#include <bits/stdc++.h>
using namespace std;
long long i, j, k, m, n, p, s, t, x, a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (cin >> t; t--;) {
    cin >> n >> x;
    for (i = p = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == x) p = 1;
    }
    sort(a, a + n);
    if (p)
      cout << 1 << endl;
    else if (a[n - 1] > x)
      cout << 2 << endl;
    else
      cout << (x - 1) / a[n - 1] + 1 << endl;
  }
}
