#include <bits/stdc++.h>
using namespace std;
int t;
int n, x;
int a[100010];
bool one;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &x);
    int mx = 0;
    one = false;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == x) one = true;
      mx = max(mx, a[i]);
    }
    if (one)
      printf("1\n");
    else if (x % mx == 0)
      printf("%d\n", x / mx);
    else if (x < mx)
      printf("2\n");
    else
      printf("%d\n", x / mx + 1);
  }
  return 0;
}
