L1-003 个位数统计

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
#include<cmath>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#define ll long long
#define mes(x,y) memset(x,y,sizeof(x))
using namespace std;
int main(){
	 map<long,long>mmap;
	 set<char>sset;
	 set<char>::iterator ssset;
	 string s;
	 while(cin>>s){
	 	for(int i=0;i<s.length();i++){
	 		mmap[s[i]]++;
	 		sset.insert(s[i]);
		 }
		 for(ssset=sset.begin();ssset!=sset.end();ssset++){
		 	cout<<*ssset<<":"<<mmap[*ssset]<<endl;
		 }
	 }
	return 0;
}

相关文章:

  • 2021-10-15
  • 2022-12-23
  • 2021-12-21
  • 2021-07-29
  • 2022-12-23
  • 2021-11-17
  • 2021-06-15
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2021-10-07
  • 2021-09-04
  • 2021-08-09
  • 2022-01-25
  • 2022-01-12
相关资源
相似解决方案