6780 | 2023-12-19 09:47:13 | VKristof | Bevásárlás | cpp17 | Wrong answer 0/100 | 3ms | 3836 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1880 KiB | ||||
2 | Wrong answer | 3ms | 2116 KiB | ||||
3 | Wrong answer | 3ms | 2196 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 3ms | 2352 KiB | ||||
5 | Wrong answer | 3ms | 2604 KiB | ||||
6 | Wrong answer | 3ms | 2852 KiB | ||||
subtask3 | 0/20 | ||||||
7 | Wrong answer | 3ms | 2828 KiB | ||||
8 | Wrong answer | 3ms | 3080 KiB | ||||
9 | Wrong answer | 3ms | 3180 KiB | ||||
10 | Wrong answer | 3ms | 3392 KiB | ||||
subtask4 | 0/30 | ||||||
11 | Wrong answer | 3ms | 3368 KiB | ||||
12 | Wrong answer | 3ms | 3368 KiB | ||||
13 | Wrong answer | 3ms | 3500 KiB | ||||
14 | Wrong answer | 3ms | 3512 KiB | ||||
subtask5 | 0/40 | ||||||
15 | Wrong answer | 3ms | 3504 KiB | ||||
16 | Wrong answer | 3ms | 3628 KiB | ||||
17 | Wrong answer | 3ms | 3764 KiB | ||||
18 | Wrong answer | 3ms | 3832 KiB | ||||
19 | Wrong answer | 3ms | 3836 KiB | ||||
20 | Wrong answer | 3ms | 3780 KiB |