#include <bits/stdc++.h>
using namespace std;
const int MAX = 105;
const long long INF = 1e9 + 7;
const long long MOD = 1e9 + 7;
const double PI = 3.1415926535;
int t, n, x, Max, temp, ans;
int main() {
  scanf("%d", &t);
  while (t--) {
    ans = 0;
    Max = 0;
    scanf("%d %d", &n, &x);
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &temp);
      Max = max(Max, temp);
      if (temp == x) {
        ans = 1;
      }
    }
    if (ans == 0) {
      if (x % Max == 0) {
        ans = max(2, x / Max);
      } else {
        ans = max(2, x / Max + 1);
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
