#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n, x, ma = INT_MIN, a;
    cin >> n >> x;
    vector<int> mat(n, 0);
    set<int> st;
    for (int i = 0; i < n; i++) {
      cin >> a;
      ma = max(ma, a);
      st.insert(a);
    }
    int ans = 0;
    bool b = false;
    while (x > 0) {
      if (st.find(x) != st.end()) {
        ans++;
        break;
      } else if (x <= 2 * ma) {
        if (b)
          ans++;
        else
          ans += 2;
        break;
      } else {
        b = true;
        int k = x / ma;
        x = x - k * ma;
        ans += k;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
