#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int a[n + 10];
    int f = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == x) f = 1;
    }
    if (f == 1) {
      cout << "1" << endl;
      continue;
    }
    sort(a + 1, a + 1 + n);
    int mn;
    mn = x / a[n];
    if (mn == 0) {
      cout << "2" << endl;
      continue;
    }
    if (x % a[n]) mn++;
    cout << mn << endl;
  }
  return 0;
}
