#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
char dir[4] = {'u', 'l', 'd', 'r'};
long long int cmp1(pair<long long int, string> a,
                   pair<long long int, string> b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second < b.second;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long int n, x;
    cin >> n >> x;
    bool abc = 0;
    vector<long long int> a(n);
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == x) {
        if (abc == 0) {
          cout << 1 << endl;
          abc = 1;
        }
      }
    }
    if (abc == 1) continue;
    sort((a).begin(), (a).end());
    if (x < a[n - 1]) {
      cout << 2 << endl;
    } else {
      long long int tmp = x / a[n - 1];
      if (x % a[n - 1] != 0) tmp++;
      cout << tmp << endl;
    }
  }
  return 0;
}
