#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, x, i, j = 2, ans = pow(10, 12), f = 0;
    cin >> n >> x;
    long long a[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == x) f = 1;
    }
    sort(a, a + n);
    double k;
    k = a[n - 1];
    ans = ceil(x / k);
    if (f == 1)
      cout << 1 << endl;
    else
      cout << max(j, ans) << endl;
  }
}
