6570 | 2023-12-12 09:54:07 | Gervid | Bolha a számegyenesen | cpp17 | Wrong answer 10/100 | 3ms | 3656 KiB |
#include <iostream>
using namespace std;
int main()
{
int i, n, coord = 0;
cin >> n;
char current;
for (i = 0; i < n; i++)
{
cin >> current;
if (current == 'L')
{
coord--;
}
else
{
coord++;
}
}
cout << -coord;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2068 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 3ms | 2312 KiB | ||||
4 | Accepted | 2ms | 2392 KiB | ||||
5 | Accepted | 3ms | 2488 KiB | ||||
6 | Accepted | 3ms | 2692 KiB | ||||
subtask3 | 10/10 | ||||||
7 | Accepted | 3ms | 2904 KiB | ||||
8 | Accepted | 3ms | 2988 KiB | ||||
9 | Accepted | 3ms | 3120 KiB | ||||
10 | Accepted | 3ms | 3204 KiB | ||||
11 | Accepted | 3ms | 3204 KiB | ||||
subtask4 | 0/75 | ||||||
12 | Accepted | 2ms | 3204 KiB | ||||
13 | Wrong answer | 3ms | 3200 KiB | ||||
14 | Accepted | 3ms | 3208 KiB | ||||
15 | Wrong answer | 3ms | 3208 KiB | ||||
16 | Accepted | 3ms | 3312 KiB | ||||
17 | Accepted | 3ms | 3200 KiB | ||||
18 | Accepted | 3ms | 3600 KiB | ||||
19 | Wrong answer | 3ms | 3556 KiB | ||||
20 | Wrong answer | 3ms | 3640 KiB | ||||
21 | Accepted | 3ms | 3656 KiB |