#include <bits/stdc++.h>
using namespace std;
ifstream fin("test.in");
int main() {
  ios::sync_with_stdio(false);
  int t, i, n, d, maxim, x;
  cin >> t;
  while (t--) {
    cin >> n >> d;
    maxim = -1;
    for (i = 1; i <= n; i++) {
      cin >> x;
      if (x == d || maxim == d)
        maxim = d;
      else
        maxim = max(x, maxim);
    }
    if (d < maxim)
      cout << 2 << '\n';
    else if (d % maxim)
      cout << d / maxim + 1 << '\n';
    else
      cout << d / maxim << '\n';
  }
}
