#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, inf = 1061109567;
const long long infll = 4557430888798830399;
const int N = 1e5 + 5;
int n, a[N], x;
int ceiling(int a, int b) { return (a + b - 1) / b; }
void proc() {
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = inf;
  for (int i = 0; i < n; i++) {
    if (a[i] == x) {
      cout << "1\n";
      return;
    }
    ans = min(ans, max(2, ceiling(x, a[i])));
  }
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) proc();
  return 0;
}
