#include <bits/stdc++.h>
using namespace std;
int main() {
  int tt, qq;
  cin >> tt;
  for (qq = 1; qq <= tt; qq++) {
    long long n, i, mx = 0, x, flag = 0;
    cin >> n >> x;
    while (n--) {
      cin >> i;
      mx = max(mx, i);
      if (i == x) flag = 1;
    }
    if (flag) {
      cout << 1 << endl;
    } else {
      cout << max((long long)2, (x + mx - 1) / mx) << endl;
    }
  }
}
