2733 | 2023-01-19 21:42:48 | kristof | Bolha a számegyenesen | python3 | Accepted 100/100 | 17ms | 13284 KiB |
N = int(input())
movement = input()
pos = 0
for i in movement:
if i == "L":
pos -= 1
if i == "R":
pos += 1
print(abs(0 - pos))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11052 KiB | ||||
2 | Accepted | 16ms | 11180 KiB | ||||
subtask2 | 15/15 | ||||||
3 | Accepted | 17ms | 11240 KiB | ||||
4 | Accepted | 16ms | 11252 KiB | ||||
5 | Accepted | 17ms | 11668 KiB | ||||
6 | Accepted | 17ms | 11904 KiB | ||||
subtask3 | 10/10 | ||||||
7 | Accepted | 17ms | 11760 KiB | ||||
8 | Accepted | 17ms | 12012 KiB | ||||
9 | Accepted | 17ms | 12332 KiB | ||||
10 | Accepted | 17ms | 12556 KiB | ||||
11 | Accepted | 16ms | 12476 KiB | ||||
subtask4 | 75/75 | ||||||
12 | Accepted | 17ms | 12552 KiB | ||||
13 | Accepted | 17ms | 12648 KiB | ||||
14 | Accepted | 17ms | 12616 KiB | ||||
15 | Accepted | 17ms | 12840 KiB | ||||
16 | Accepted | 17ms | 13052 KiB | ||||
17 | Accepted | 17ms | 13168 KiB | ||||
18 | Accepted | 17ms | 13284 KiB | ||||
19 | Accepted | 17ms | 13200 KiB | ||||
20 | Accepted | 17ms | 13196 KiB | ||||
21 | Accepted | 17ms | 13192 KiB |