#include <bits/stdc++.h>
using namespace std;
int main() {
  int cases;
  cin >> cases;
  for (int i = 0; i < cases; i++) {
    int n, x;
    cin >> n >> x;
    int maxx = 0;
    bool check = false;
    for (int k = 0; k < n; k++) {
      int num;
      cin >> num;
      if (num == x) check = true;
      maxx = max(maxx, num);
    }
    if (check) {
      cout << 1 << endl;
    } else {
      if (maxx >= x) {
        cout << 2 << endl;
      } else {
        if (((x * 1.0) / 2) <= maxx) {
          cout << 2 << endl;
        } else {
          int t = x / maxx;
          if (maxx * t < x) t++;
          cout << t << endl;
        }
      }
    }
  }
}
