#include <bits/stdc++.h>
using namespace std;
int T, x, n, a, hav;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &x);
    a = hav = 0;
    for (int i = 1, r; i <= n; i++) {
      scanf("%d", &r);
      a = max(a, r);
      if (r == x) hav = 1;
    }
    if (hav)
      printf("1\n");
    else if (a <= x)
      printf("%d\n", (x - 1) / a + 1);
    else
      printf("2\n");
  }
  return 0;
}
