这题
#include <bits/stdc++.h>
using namespace std;
map<int, int> p;
vector<int> id;
int cala(int n){
int cnt = 0;
for (int i = 0; i < id.size(); i++)
cnt += p[id[i]] / n * n;
return cnt;
}
int main(){
int n, pos = 0, maxx = 0;
cin >> n;
for (int i = 1; i <= n; i++){
int k;
cin >> k;
if (p[k] == 0)
id.push_back(k);
p[k]++;
maxx = max(maxx, p[k]);
}
for (int i = 1; i <= n; i++)
if (i <= maxx)
cout << cala(i) << " ";
else
cout << "0 ";
return 0;
}