#include <bits/stdc++.h>
using namespace std;
int main() {
  long int T, n, x;
  long int i, j, k;
  bool eqx;
  cin >> T;
  while (T--) {
    eqx = false;
    k = -1;
    cin >> n >> x;
    for (i = 0; i < n; ++i) {
      cin >> j;
      k = max(k, j);
      if (j == x) eqx = true;
    }
    if (eqx) {
      cout << 1;
    } else if (k > x) {
      cout << 2;
    } else {
      if (x % k == 0)
        cout << x / k;
      else
        cout << x / k + 1;
    }
    cout << "\n";
  }
}
