#include <bits/stdc++.h>
using namespace std;
int t;
int a[100000 + 10];
int n, x;
void solve() {
  cin >> n >> x;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int maxx = -1;
  bool flag = false;
  for (int i = 1; i <= n; i++) {
    if (maxx < a[i]) maxx = a[i];
    if (x == a[i]) flag = true;
  }
  if (flag)
    cout << 1 << endl;
  else
    cout << max(2, (x + maxx - 1) / maxx) << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) solve();
  return 0;
}
