#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int tc;
  scanf("%lld", &tc);
  while (tc--) {
    long long int n, x, joss, ans = 1000000005;
    scanf("%lld%lld", &n, &x);
    for (long long int i = 0; i < n; i++) {
      long long int a;
      scanf("%lld", &a);
      if (a <= x) {
        joss = x / a;
        if (x % a != 0) joss++;
      } else
        joss = 2;
      ans = min(ans, joss);
    }
    printf("%lld\n", ans);
  }
  return 0;
}
