#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int ans = 0x3f3f3f3f, m, a;
    m = x / 2 + x % 2;
    for (int i = 1; i <= n; i++) {
      cin >> a;
      if (a == x) ans = 1;
      if (a >= m) ans = min(ans, 2);
      if (a < m) {
        if (x % a)
          ans = min(ans, x / a + 1);
        else
          ans = min(ans, x / a);
      }
    }
    cout << ans << endl;
  }
}
