#include <bits/stdc++.h>
using namespace std;
int main()
{
#ifdef ONLINE_JUDGE
#else
freopen("in.txt", "r", stdin);
#endif
int N, key;
cin >> N;
map<int, int> M;
int i;
for(i = 0; i < N; i++){
cin >> key;
M[key]++;
}
map<int, int>::iterator it;
for(it = M.begin(); it != M.end(); it++){
cout << it->first << ":" << it->second << endl;
}
return 0;
}
PTA 7-13 统计工龄 (20 分)
最新推荐文章于 2021-10-31 06:00:00 发布