#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, x;
    cin >> n >> x;
    vector<long long> vec(n);
    for (long long i = 0; i < n; i++) cin >> vec[i];
    long long maxi = vec[0];
    long long f = 0;
    for (long long i = 0; i < n; i++) {
      if (vec[i] == x) f = 1;
      maxi = max(maxi, vec[i]);
    }
    if (f)
      cout << "1" << endl;
    else {
      long long p = ceil((double)x / (double)maxi);
      if (p * maxi == x)
        cout << p << endl;
      else {
        if (p >= 2)
          cout << p << endl;
        else
          cout << "2" << endl;
      }
    }
  }
  return 0;
}
