лови, трудяга:
signed main(){
string s;
char k;
int ans = 0;
cin >> s >> k;
for(auto &i : s)
ans += i == k;
cout << ans;
}
лови, трудяга:
signed main(){
string s;
char k;
int ans = 0;
cin >> s >> k;
for(auto &i : s)
ans += i == k;
cout << ans;
}