Codeforces Round #613 (Div. 2)---Solution of Problem A

Revision ru2, by Ali-Kemal, 2020-01-10 20:03:30
#include<bits/stdc++.h>   
using namespace std;     
int n,a,l,r;     
string s;     
int main(){
    cin>>n>>s;
    for (int i = 0; i < n; ++i){
        if(s[i]=='L') l++;
        else r++;
    }cout<<(l+r)+1<<"\n";
 }

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru2 Russian Ali-Kemal 2020-01-10 20:03:30 110
ru1 Russian Ali-Kemal 2020-01-10 20:01:49 391 Первая редакция (опубликовано)