#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int a[n];
    for (int i = 0; i < n; ++i) cin >> a[i];
    sort(a, a + n);
    int ans = 0;
    for (int i = n - 1; i > 0; --i) {
      int q = (k - a[i]) / a[0];
      ans += q;
      a[i] += q * a[0];
    }
    sort(a + 1, a + n);
    ans += (k - a[0]) / a[1];
    cout << ans << endl;
  }
}
