65702023-12-12 09:54:07GervidBolha a számegyenesencpp17Wrong answer 10/1003ms3656 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2068 KiB
subtask20/15
3Wrong answer3ms2312 KiB
4Accepted2ms2392 KiB
5Accepted3ms2488 KiB
6Accepted3ms2692 KiB
subtask310/10
7Accepted3ms2904 KiB
8Accepted3ms2988 KiB
9Accepted3ms3120 KiB
10Accepted3ms3204 KiB
11Accepted3ms3204 KiB
subtask40/75
12Accepted2ms3204 KiB
13Wrong answer3ms3200 KiB
14Accepted3ms3208 KiB
15Wrong answer3ms3208 KiB
16Accepted3ms3312 KiB
17Accepted3ms3200 KiB
18Accepted3ms3600 KiB
19Wrong answer3ms3556 KiB
20Wrong answer3ms3640 KiB
21Accepted3ms3656 KiB