#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n, d, flag = 0, flag1 = 0, m = 0;
    cin >> n >> d;
    long long int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == d) flag = 1;
      if (a[i] > m) m = a[i];
    }
    flag1 = d / m;
    if (flag1 * m != d) flag1++;
    if (flag1 == 1) flag1 = 2;
    if (flag == 1)
      cout << 1 << endl;
    else
      cout << flag1 << endl;
  }
}
