标签:turn main problem namespace set space 统计 names ble
#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main(){
string s;cin>>s;
int a[1005]={0};
for(int i=0;i<s.length();i++){
a[s[i]-‘0‘]++;
}
for(int i=0;i<=9;i++){
if(a[i]) cout<<i<<":"<<a[i]<<"\n";
}
return 0;
}
标签:turn main problem namespace set space 统计 names ble
原文地址:https://www.cnblogs.com/bingers/p/13074347.html