nick2k19's blog

By nick2k19, history, 5 years ago, In English

solution explanation

include

using namespace std;

int main() { int n; cin>>n; string s; cin>>s; int x=0; int y=0;

for(int i=0;i<n;i++){
    if(s[i]=='L'){
        x++;
    }else{
        y++;
    }
}

cout<<x+y+1<<endl;

}

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?