#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a.begin(), a.end());
    if (find(a.begin(), a.end(), x) != a.end())
      cout << "1\n";
    else {
      int m = *max_element(a.begin(), a.end());
      int k = ceil((double)x / m);
      if (k >= 2)
        cout << k << "\n";
      else
        cout << 2 << "\n";
    }
  }
}
