#include <bits/stdc++.h>
using namespace std;
int binarySearch(long long int arr[], long long int l, long long int r,
                 long long int x) {
  if (r >= l) {
    long long int mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x);
    return binarySearch(arr, mid + 1, r, x);
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, x;
    cin >> n >> x;
    long long int a[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    long long int ans = 0;
    if (binarySearch(a, 0, n - 1, x) != -1) {
      ans = 1;
    } else {
      if (x % a[n - 1] == 0) {
        ans = x / a[n - 1];
      } else {
        if (x / a[n - 1] == 0) {
          ans++;
        }
        ans += x / a[n - 1] + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
