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