67812023-12-19 09:48:06VKristofBolha a számegyenesencpp17Wrong answer 10/1003ms4160 KiB
#include <iostream>

using namespace std;

int main()
{
    int a,b=0;
    cin>>a;
    char c[a];
    for(int i=0; i<a; i++)
    {
      cin>>c[i];
    }
    for(int i=0; i<a; i++)
        {
         if(c[i]=='R')
         {
          b=b-1;
         }
         else if(c[i]=='L')
         {
           b=b+1;
         }
        }
        cout<<b;


    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1744 KiB
2Accepted3ms1996 KiB
subtask20/15
3Wrong answer3ms2208 KiB
4Accepted3ms2292 KiB
5Accepted3ms2332 KiB
6Accepted3ms2420 KiB
subtask310/10
7Accepted3ms2416 KiB
8Accepted3ms2424 KiB
9Accepted3ms2548 KiB
10Accepted3ms2804 KiB
11Accepted3ms2840 KiB
subtask40/75
12Accepted3ms2848 KiB
13Wrong answer3ms2848 KiB
14Accepted3ms3084 KiB
15Wrong answer3ms3184 KiB
16Accepted3ms3416 KiB
17Accepted3ms3640 KiB
18Accepted3ms3808 KiB
19Wrong answer3ms3820 KiB
20Wrong answer3ms3916 KiB
21Accepted3ms4160 KiB