Advertisement
leminhkt

68

Jul 20th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     string S, S1;
  5.     cin >> S >> S1;
  6.     int res = 0;
  7.     for(int i = 0; (i = S.find(S1, i)) != string::npos; ++i, ++res);
  8.     cout << res;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement