You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
267 B

#include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
int cnt = 0;
for (int i = 0; i < a.size() - b.size() + 1; i++)
if (b == a.substr(i, b.size())) cnt++;
cout << cnt << endl;
return 0;
}