#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k, r = 1e18;
    cin >> n >> k;
    long long a[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == k) r = 1;
      if (abs(k - a[i]) <= a[i]) {
        long long alp = 2;
        r = min(r, alp);
      } else {
        if (abs(a[i] - k) % a[i] == 0)
          r = min(r, abs(a[i] - k) / a[i] + 1);
        else
          r = min(r, abs(a[i] - k) / a[i] + 2);
      }
    }
    cout << r << endl;
  }
}
