L1-003 个位数统计 (15 point(s))

没啥好说的又写了一次的水题。

#include <bits/stdc++.h>
using namespace std;

int main(){
	string str;
	cin >> str;
	map<char, int> ans;
	for(auto s: str) ans[s]++;
	for(auto a: ans) 
		cout << a.first << ":" << a.second << endl;
} 

posted on 2021-09-25 20:16  Atl212  阅读(32)  评论(0)    收藏  举报

导航