problem 1285 A Solution — Mezo playing zoma

Revision en3, by nick2k19, 2020-02-01 18:02:05

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;

}

Tags #c++, #math, #1285 a, #solution, #problem solving, #mezo playing zoma, #tutorials

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English nick2k19 2020-02-01 18:02:05 297 Reverted to en1
en2 English nick2k19 2020-02-01 18:01:25 297
en1 English nick2k19 2020-02-01 17:56:56 400 Initial revision (published)