67822023-12-19 09:50:25VKristofBolha a számegyenesencpp17Wrong answer 10/1003ms4112 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
         {
           b=b+1;
         }
        }
        cout<<b;


    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2068 KiB
subtask20/15
3Wrong answer3ms2152 KiB
4Accepted3ms2276 KiB
5Accepted3ms2296 KiB
6Accepted3ms2516 KiB
subtask310/10
7Accepted3ms2636 KiB
8Accepted3ms2824 KiB
9Accepted3ms3012 KiB
10Accepted3ms3504 KiB
11Accepted3ms3524 KiB
subtask40/75
12Accepted3ms3592 KiB
13Wrong answer3ms3532 KiB
14Accepted3ms3544 KiB
15Wrong answer3ms3544 KiB
16Accepted3ms3656 KiB
17Accepted3ms3732 KiB
18Accepted3ms3748 KiB
19Wrong answer3ms3748 KiB
20Wrong answer3ms3868 KiB
21Accepted3ms4112 KiB