#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, x;
  cin >> n >> x;
  long long arr[n];
  long long ans = 1e9;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (x % arr[i] == 0) {
      ans = min(ans, x / arr[i]);
    } else
      ans = min(max(2LL, x / arr[i] + 1), ans);
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
