题解 | #字符的个数#
字符的个数
https://www.nowcoder.com/practice/dc28f2bf113a4058be888a5875206238
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; // write your code here...... int cnt[3]={0}; for(int i=0; i<s.size(); i++){ cnt[s[i]-'a']++; } cout<<cnt[0]<<" "<<cnt[1]<<" "<<cnt[2]<<" "<<endl; return 0; }