Submission #906503


Source Code Expand

Copy
X = input()
x = X
t = 0
s = 0
while x[0] == "T":
	t += 1
	x = x[1:]
while x[-1] == "S":
	s += 1
	x = x[:-1]
print(2*max(s,t))

Submission Info

Submission Time
Task A - STring
User TAB
Language Python3 (3.4.3)
Score 0
Code Size 135 Byte
Status
Exec Time 134 ms
Memory 3560 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example0, example1, example2
Subtask1 0 / 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 23 ms 3500 KB
corner1 59 ms 3560 KB
corner2 134 ms 3556 KB
example0 22 ms 3064 KB
example1 23 ms 3064 KB
example2 22 ms 3064 KB
handmade0 22 ms 3064 KB
handmade1
maxrand0 24 ms 3560 KB
sub_corner0 23 ms 3064 KB
sub_corner1 23 ms 3064 KB
sub_corner2 23 ms 3064 KB
sub_rand0 22 ms 3064 KB