#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, x;
    cin >> n >> x;
    int a[n];
    int idx = -1;
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
      if (idx == -1 || a[i] > a[idx]) {
        idx = i;
      }
    }
    int ans = x / a[idx];
    int rem = x % a[idx];
    int fnd = 0;
    for (int i = 0; i < n; ++i) {
      if (a[i] == rem) {
        ans++;
        fnd = 1;
        break;
      }
    }
    if (!fnd && rem != 0) {
      if (ans == 0) {
        ans = 2;
      } else {
        ans++;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
