Subscribe Us

Responsive Advertisement

Advertisement

978 B codeforces solution in cpp

 

978 B codeforces solution in cpp

by ujjal roy


#include<bits/stdc++.h>

using namespace std;

main()

{

    int n,i,c=0;

    string s;

    cin>>n>>s;

    for(i=0;i<s.size()-1;i++)

    {

        if(s[i]=='x'&&s[i+1]=='x'&&s[i+2]=='x') c++;

    }

    cout<<c<<endl;

    return 0;

}


Post a Comment

0 Comments