#include <bits/stdc++.h>
using namespace std;
long long brr[500000];
long long arr[500000];
map<int, int> mm;
map<long long, long long> mmm;
vector<int> v;
vector<long long> vv;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);
  int t;
  cin >> t;
  while (t--) {
    long long n, x;
    cin >> n >> x;
    set<long long> a;
    long long y, maxi = -1;
    for (int i = 0; i < n; i++) {
      cin >> y;
      a.insert(y);
      maxi = max(maxi, y);
    }
    if (a.count(x))
      cout << "1" << endl;
    else
      cout << max((long long)2, (long long)(x + maxi - 1) / maxi) << endl;
  }
}
