#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int a[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int ok = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == x) {
        ok = 1;
      }
    }
    if (ok == 1) {
      cout << 1 << '\n';
      continue;
    }
    sort(a + 1, a + 1 + n);
    int b = a[n];
    if (x < b) {
      cout << 2 << '\n';
    } else if (x % b == 0) {
      cout << x / b << '\n';
    } else {
      cout << x / b + 1 << '\n';
    }
  }
}
