#include <iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
int main()
{
vector<string> v;
string s1, s2;
cin >> s1 >> s2;
size_t l2 = s2.size();
for (int i = 0; i != s1.size() - l2; i = i + 1)
v.push_back(s1.substr(i, l2));
cout << count(v.begin(), v.end(), s2) << endl;
return 0;
}
字符串出现个数
最新推荐文章于 2023-06-15 23:29:02 发布