#include <bits/stdc++.h>
using namespace std;
long long int T, n, x, a[100010], ans, dt[26][100010], dt2[26][26];
string s;
int main() {
  ios::sync_with_stdio(false);
  cin >> T;
  while (T--) {
    cin >> n >> x;
    for (int i = 0; i < n; i++) cin >> a[i];
    ans = 999999987654321;
    for (int i = 0; i < n; i++)
      ans = min(ans, x / a[i] + (bool)(x % a[i]) + (x / a[i] ? 0 : 1));
    cout << ans << endl;
  }
}
