#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long int n, x;
    cin >> n >> x;
    long int arr[n], result, c = 0;
    for (int i = 0; i < n; i++) cin >> arr[i];
    sort(arr, arr + n, greater<int>());
    for (int i = 0; i < n; i++) {
      if (arr[i] == x) {
        c = 1;
        break;
      }
    }
    if (c == 1)
      cout << "1" << endl;
    else {
      int res = ceil((x * 1.0) / arr[0]);
      cout << max(2, res) << endl;
    }
  }
}
