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