Submission #907827


Source Code Expand

Copy
X = input()
stack = []
for l in X:
	if stack == []:
		stack.append(l)
	elif stack[-1] == "S" and l == "T":
		stack = stack[:-1]
	else:
		stack.append(l)
print(len(stack))

Submission Info

Submission Time
Task A - STring
User TAB
Language Python3 (3.4.3)
Score 200
Code Size 179 Byte
Status

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example0, example1, example2
Subtask1 200 / 200 example0, example1, example2, sub_corner0, sub_corner1, sub_corner2, sub_rand0, handmade0, handmade1
All 0 / 100 corner0, corner1, corner2, example0, example1, example2, handmade0, handmade1, maxrand0, sub_corner0, sub_corner1, sub_corner2, sub_rand0
Case Name Status Exec Time Memory
corner0
corner1 268 ms 7648 KB
corner2
example0 23 ms 3064 KB
example1 24 ms 3064 KB
example2 23 ms 3064 KB
handmade0 23 ms 3064 KB
handmade1 23 ms 3064 KB
maxrand0 266 ms 3500 KB
sub_corner0 24 ms 3064 KB
sub_corner1 23 ms 3064 KB
sub_corner2 23 ms 3064 KB
sub_rand0 23 ms 3064 KB