#include <bits/stdc++.h>
using namespace std;
long long int tc, n, x;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> tc;
  while (tc) {
    cin >> n >> x;
    long long int t;
    vector<long long int> a;
    for (int i = 0; i < n; ++i) {
      cin >> t;
      a.push_back(t);
    }
    sort(a.begin(), a.end());
    int count = 0;
    if (a[n - 1] <= x) {
      count = ceil((double)x / (double)a[n - 1]);
    } else {
      count = 2;
    }
    for (int i = 0; i < n; ++i) {
      if (a[i] == x) {
        count = 1;
        break;
      }
    }
    cout << count << "\n";
    tc--;
  }
}
