Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- long long res, i, R, L, x;
- string a;
- int main(){
- cin>>a;
- res=0;
- for(i=0; i<a.length(); i++){
- if(a[i]=='k')x++;
- if(a[i]=='p'){
- if(x>=res)res=x;
- x=0;
- }
- }
- cout<<res;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement