Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
s1 = re.compile(r'01|10')
l1 = re.compile(r'0000011111|1111100000|00001111|11110000|000111|111000')
for i in range(len(s)//2):
  dst = re.sub(s1, "", s)
  dst = re.sub(l1, "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
s1 = re.compile(r'01|10')
l1 = re.compile(r'000111|111000|00001111|11110000|0000011111|1111100000')
for i in range(len(s)//2):
  dst = re.sub(s1, "", s)
  dst = re.sub(l1, "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
s1 = re.compile(r'01|10')
l1 = re.compile(r'00000000000000000000001111111111111111111111|11111111111111111111110000000000000000000000')
for i in range(len(s)//2):
  dst = re.sub(s1, "", s)
  dst = re.sub(l1, "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  dst = re.sub(r'00000000000000000000001111111111111111111111|11111111111111111111110000000000000000000000', "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  dst = re.sub(r'0000000000011111111111|1111111111100000000000', "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  dst = re.sub(r'000000111111', "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Runtime Error):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  dst = re.sub(r'000000111111', "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Runtime Error):
import re
s=input()
m=0
for i in range(len(s)/2):
  dst = re.sub(r'01|10', "", s)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)):
  dst = re.sub(r'01|10', "", s)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)

Buggy python submission (verdict: Time Limit Exceeded):
import re
s=input()
m=0
for i in range(len(s)):
  dst = re.sub(r'01|10', "", s,1)
  if dst == s:
    break
  s = dst
  m += 2
print(m)

Fixed submission:
s=input();print(min(s.count("0"), s.count("1"))*2)