ShafiulAzim

codeforces 978B

Feb 17th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i,c=0,ans=0;
  6. cin>>n;
  7. string str;
  8. cin>>str;
  9. for(i=0; i<n; i++)
  10. {
  11. if(str[i]=='x' && str[i+1]=='x' && str[i+2]=='x')
  12. c++;
  13. }
  14. cout<<c<<endl;
  15.  
  16.  
  17. }
Add Comment
Please, Sign In to add comment