Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- string S, S1;
- cin >> S >> S1;
- int res = 0;
- for(int i = 0; (i = S.find(S1, i)) != string::npos; ++i, ++res);
- cout << res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement