#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t > 0) {
    long n;
    long long z;
    long long x;
    cin >> n;
    cin >> x;
    vector<long long> A(n + 5);
    bool flag = 0;
    long long m = INT_MIN;
    long long ans = 0;
    for (long i = 0; i < n; i++) {
      cin >> A[i];
      if (A[i] == x) {
        flag = 1;
      }
      if (A[i] > m) {
        m = max(A[i], m);
      }
    }
    if (flag == 1) {
      cout << "1\n";
      t -= 1;
      continue;
    }
    if (x < m) {
      ans = 1;
    } else {
      ans = x / m;
    }
    if (x % m != 0) ans += 1;
    cout << ans << endl;
    t -= 1;
  }
  return 0;
}
