#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1, c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f == 1 ? x : -x;
}
const int N = 1e5 + 4;
int n, X, a[N];
inline void solve() {
  n = read();
  X = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + n + 1);
  if (a[n] < X) {
    cout << (X + a[n] - 1) / a[n] << "\n";
  } else {
    for (int i = 1; i <= n; i++)
      if (X == a[i]) {
        puts("1");
        return;
      }
    puts("2");
  }
}
int main() {
  for (int T = read(); T--;) solve();
  return (0 - 0);
}
