#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int qq = 1;
  cin >> qq;
  for (int qqq = 0; qqq < qq; qqq++) {
    int n, first, v;
    cin >> n >> first;
    int maxx = 0;
    int maxxd = 0;
    for (int i = 0; i < n; i++) {
      cin >> v;
      maxx = max(maxx, v);
      if (v <= first) {
        maxxd = max(maxxd, v);
      }
    }
    if (maxxd == 0)
      cout << 2 << "\n";
    else if (maxx == maxxd) {
      cout << first / maxx + (first % maxx > 0) << "\n";
    } else if (maxxd == first) {
      cout << 1 << "\n";
    } else
      cout << 2 << "\n";
  }
  return 0;
}
