#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, x;
    cin >> n >> x;
    long long int closest = 99999999;
    long long int aux;
    long long int mxnum = 0;
    bool flag = true;
    for (long long int i(0); i < n; i++) {
      cin >> aux;
      mxnum = max(mxnum, aux);
      if (aux == x) {
        cout << 1 << endl;
        flag = false;
      }
    }
    if (flag) {
      if (x > mxnum) {
        cout << (x + mxnum - 1) / mxnum << endl;
      } else {
        cout << 2 << endl;
      }
    }
  }
  return 0;
}
