#include <bits/stdc++.h>
using namespace std;
int t, n, x;
int a[100000];
int main() {
  int i, maxa, min_cnt;
  scanf("%d", &t);
  for (; t > 0; t--) {
    scanf("%d%d", &n, &x);
    maxa = 0;
    min_cnt = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      maxa = max(maxa, a[i]);
      if (x == a[i]) {
        min_cnt = 1;
      }
    }
    if (min_cnt != 1) {
      if (x < maxa) {
        min_cnt = 2;
      } else if (x > maxa) {
        min_cnt = x / maxa;
        if (x % maxa != 0) {
          min_cnt++;
        }
      }
    }
    printf("%d\n", min_cnt);
  }
  return 0;
}
