#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int max_ele = -1;
    int flag = 0;
    for (int i = 0; i < n; i++) {
      int ele;
      cin >> ele;
      max_ele = max(max_ele, ele);
      if (ele == x) flag = 1;
    }
    int ans;
    if (x >= max_ele)
      ans = ceil(((double)x) / max_ele);
    else {
      if (flag == 1)
        ans = 1;
      else
        ans = 2;
    }
    cout << ans << endl;
  }
  return 0;
}
