简介
简单
code
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main() {
string s;
getline(cin, s);
string t;
cin >> t;
map<char, int> cc;
for(auto it : s){
if(it >='a' && it <= 'z') cc[it-'a' + 'A']++;
else cc[it]++;
}
if(t[0] >='a' && t[0] <='z') cout << cc[t[0] - 'a' + 'A'] << endl;
else cout << cc[t[0]] <<endl;
return 0;
}