#include <bits/stdc++.h>
using namespace std;
void enter(vector<long long int> &ar) {
  long long int n = ar.size();
  for (long long int i = 0; i < n; i++) {
    cin >> ar[i];
  }
}
void show(vector<long long int> &a) {
  long long int n = a.size();
  for (long long int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
void SieveOfEratosthenes(int n, vector<long long int> &pri) {
  vector<bool> prime(n + 1, true);
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      pri.push_back(p);
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long long int> a(n);
    enter(a);
    vector<long long int> count(1e5 + 1, 0);
    for (long long int i = 0; i < n; i++) {
      count[a[i]]++;
    }
    sort(count.begin(), count.end(), greater<long long int>());
    long long int m = count[0] - 1;
    long long int sum = 0;
    for (long long int i = 1; i < 1e5 + 1; i++) {
      sum += min(count[i], m);
    }
    long long int ans = sum / m;
    cout << ans << "\n";
  }
  return 0;
}
