68002023-12-19 10:19:12HunMartin23Decimáliacpp17Wrong answer 0/1008ms6256 KiB
#include <iostream>

using namespace std;

int main()
{
    int N,db=0,db1=0;
    cin>>N;
    char S[N];
    for (int i=1;i<=N;i++)
    {
        cin>>S[i];
        if (S[i]=='R')
        {
            db++;
        }
        else if (S[i]=='L')
        {
            db1++;
        }
    }
    cout<<abs(db-db1);
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1880 KiB
2Wrong answer3ms2072 KiB
3Wrong answer3ms2308 KiB
subtask20/25
4Accepted3ms2396 KiB
5Wrong answer3ms2544 KiB
6Wrong answer3ms2740 KiB
7Wrong answer3ms2848 KiB
8Wrong answer3ms3256 KiB
subtask30/26
9Wrong answer3ms3232 KiB
10Wrong answer3ms3304 KiB
11Wrong answer3ms3460 KiB
12Wrong answer3ms3552 KiB
13Wrong answer3ms3688 KiB
14Wrong answer3ms3828 KiB
15Wrong answer3ms3780 KiB
16Wrong answer3ms3912 KiB
subtask40/19
17Wrong answer3ms4040 KiB
18Wrong answer3ms4152 KiB
19Wrong answer3ms4060 KiB
20Wrong answer3ms4208 KiB
subtask50/30
21Wrong answer8ms4656 KiB
22Wrong answer8ms4908 KiB
23Wrong answer8ms5156 KiB
24Wrong answer8ms5412 KiB
25Wrong answer8ms5648 KiB
26Wrong answer8ms5900 KiB
27Wrong answer7ms6256 KiB
28Wrong answer3ms6112 KiB