#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int N = 1e5 + 5;
signed main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, x;
    scanf("%d%d", &n, &x);
    vector<int> a(n);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a.begin(), a.end());
    if (count(a.begin(), a.end(), x)) {
      cout << 1 << '\n';
      continue;
    }
    if (a.back() > x) {
      cout << 2 << '\n';
      continue;
    }
    int ans = x / a.back();
    x %= a.back();
    if (!x)
      cout << ans << '\n';
    else
      cout << ans + 1 << '\n';
  }
  return 0;
}
