#include <bits/stdc++.h>
using namespace std;
int power(int a, int b, int mod = 1e9 + 7) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return res;
}
template <typename me>
void print(vector<me> arr) {
  for (auto val : arr) cout << val << " ";
  cout << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, X;
    cin >> n >> X;
    int maxi = 0;
    bool done = false;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      maxi = max(x, maxi);
      if (x == X) done = true;
    }
    if (done) {
      cout << "1\n";
      continue;
    }
    int ans;
    if (maxi < X) {
      ans = (X + maxi - 1) / maxi;
    } else {
      ans = 2;
    }
    cout << ans << endl;
  }
}
