#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f;
const long long MAXN = 1e6 + 10;
const long long mod = 1e9 + 7;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x;
    long long maxx = -1;
    cin >> n >> x;
    long long ans = 1e10;
    for (long long i = 0; i < n; i++) {
      long long now;
      cin >> now;
      if (now > x) {
        ans = min(ans, (long long)2);
      } else if (x % now == 0) {
        ans = min(ans, x / now);
      } else {
        ans = min(ans, x / now + 1);
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
