Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = input()
A = map(int, input().split())
even = []
count = []
for x in A:
    if x % 2 == 0:
        even.append(x)
for x in even:
    if x%3 == 0 or x%5 == 0:
        count += 1
if count == len(even):
    print("Approved")
else:
    print("Denied")


Fixed submission:
n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
Health = map(int, input().split())
temp = sorted(Health, reverse=True)
if K >= N:
    print(0)
else:
    for i in range(K):
        temp.pop(0)
    print(sum(temp))

Fixed submission:
N, K = map(int, input().split())
Health = map(int, input().split())
temp = sorted(Health, reverse=True)
if K >= N:
    print(0)
else:
    print(sum(temp[K::]))
Buggy python submission (verdict: Runtime Error):
K, X = [map(int, input().split())]
print("Yes") if K*500 >= X else print("No")

Fixed submission:
K, X = map(int, input().split())
print("Yes") if 500 * K >= X else print("No")

Buggy python submission (verdict: Runtime Error):
K, X = (int, input().split())
print("Yes") if 500*K>X else print("No")

Fixed submission:
K, X = map(int, input().split())
print("Yes") if 500 * K >= X else print("No")
Buggy python submission (verdict: Runtime Error):
[K, X] = [int(x) for x in input().split()]
if K * 500 >= X:
    print('Yes')
else:
    print('No')

Fixed submission:
N = int(input())
S = str(input())
print(S.count("ABC"))
Buggy python submission (verdict: Runtime Error):
new_str = ""
num = int(input())
string = input().split(" ")
for i in range(0,num):
    new_str += string[0][i] + string[i][0]
print("".join(new_str))

Fixed submission:
new_str = ""
num = int(input())
string = input().split(" ")
for i in range(0,num):
    new_str += string[0][i] + string[1][i]
print(new_str)
Buggy python submission (verdict: Runtime Error):
num1 = int(input())
num2 = int(input())
num3 = int(input())
if num1+num2+num3 >= 22:
    print('bust')
else:
    print('win')

Fixed submission:
num = input().split()
result = list(map(int, num))
if sum(result) >= 22:
    print('bust')
else:
    print('win')
Buggy python submission (verdict: Runtime Error):
S = input()
count = 0
first = S[:len(S)//2]
second = S[(len(S)+1)//2:]
if first == reversed(second):
    print(count)
else:
    for i in range(len(first)):
        if first[i] != second[len(second)-i-1]:
            count += 1
    print(count

Fixed submission:
S = input()
count = 0
first = S[:len(S)//2]
second = S[(len(S)+1)//2:]
if first == reversed(second):
    print(count)
else:
    for i in range(len(first)):
        if first[i] != second[len(second)-i-1]:
            count += 1
    print(count)
Buggy python submission (verdict: Runtime Error):
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
 print(s)

Fixed submission:
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
print(s)

Buggy python submission (verdict: Runtime Error):
s=''
for i in range(3):
  s=s+input()[i]
 print(s)

Fixed submission:
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
print(s)

Buggy python submission (verdict: Runtime Error):
for i in range(3):
  input().strip[i]

Fixed submission:
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
print(s)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b = int(b)

tap = 0

if b != 1:
    while ( (tap*(a-1) +1) < b:
        tap += 1

print(tap)


Fixed submission:
a, b = input().split()
a = int(a)
b = int(b)

tap = 0

if b != 1:
    while(tap*(a-1) +1) < b:
        tap += 1

print(tap)
Buggy python submission (verdict: Runtime Error):
N= int(input())
M=int(input())
if N==M:
    print("yes")
else:
    print("no")

Fixed submission:
N , M=map(int,input().split())



if N==M:
    print("Yes")

        
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
T=input()
S=input()
print(T + S)

Fixed submission:
s,t=input().split()
print(t+s)
Buggy python submission (verdict: Runtime Error):
S=input()
 
if S == 'Sunny':
	print("Cloudy)
elif S == 'Rainy':
	print('Sunny')
else:
	print('Rainy')

Fixed submission:
S=input()
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy python submission (verdict: Runtime Error):
S=input()
 
if S=='Sunny':
  print("Cloudy)
elif S=='Rainy':
  print('Sunny')
else:
  print('Rainy')

Fixed submission:
S=input()
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy python submission (verdict: Runtime Error):
S=input()

if S=='Sunny':
  print("Cloudy)
elif S=='Rainy':
  print('Sunny')
else S=='Cloudy':
  print('Rainy')

Fixed submission:
S=input()
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')
Buggy python submission (verdict: Runtime Error):
M,A = map(int,input().split())
 
if X < A:
  print("0")
else:
  print("10")

Fixed submission:
X,A = map(int,input().split())
 
if X < A:
  print(0)
else:
  print(10)

Buggy python submission (verdict: Runtime Error):
M,A = map(int,input().split())

if X < A:
  print(0)
else:
  print(10)

Fixed submission:
X,A = map(int,input().split())
 
if X < A:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int, input().split())

if N*A>B:
  print(B)
else print(N*A)

Fixed submission:
N,A,B = map(int, input().split())

if A*N < B:
    print(A*N)
else:
    print(B)
Buggy python submission (verdict: Runtime Error):
from math import log2, floor

n, k = map(int, input().split())

print(floor(log2(n)/log2(k)) + 1)

Fixed submission:
from math import log, floor
 
n, k = map(int, input().split())
 
print(floor(log(n)/log(k)) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])


Fixed submission:
from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])

Buggy python submission (verdict: Time Limit Exceeded):
from math import ceil, floor

h, n = map(int, input().split())
l = []
for _ in range(n):
  l.append(list(map(int, input().split())))

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]


for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])


Fixed submission:
from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])

Buggy python submission (verdict: Runtime Error):
from math import ceil, floor

h, n = map(int, input().split())
l = []
for _ in range(n):
  l.append(list(map(int, input().split())))

if n == 1:
  print(ceil(hp/l[0][0]) * l[0][1])
  exit(0)

dp = [
  [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)],
  [None] * (h + 1)
  ]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[1][hp] = min([dp[0][hp], dp[1][hp - l[i][0]] + l[i][1]])
    else:
      dp[1][hp] = min([dp[0][hp], l[i][1]])

  dp[0] = dp[1]
  dp[1] = [None] * (h + 1)

print(dp[0][-1])


Fixed submission:
from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict

n = int(input())
l = list(map(int, input().split()))
l.sort()

# 2辺の和リスト
d = [0] * (l[-1] * 2)
ans = 0

for i in range(n):
  for val in d[l[i] + 1:]:
    # 長さd[i]より小さい組み合わせはOK
    ans += val

  # 自身との組み合わせをdに追加
  for j in range(i):
    d[l[i] + l[j]] += 1

print(ans)


Fixed submission:
from collections import defaultdict

n = int(input())
l = list(map(int, input().split()))
l.sort()

# 2辺の和リスト
d = [0] * (l[-1] * 3)
ans = 0

for i in range(n):
  for val in d[l[i] + 1:]:
    # 長さd[i]より小さい組み合わせはOK
    ans += val

  # 自身との組み合わせをdに追加
  for j in range(i):
    d[l[i] + l[j]] += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

w = [[] for _ in range(10001)]

for i in range(n):
  a, b = map(int, input().split())
  if a == 0:
    continue
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  l += w[i]
  if len(l) == 0:
    continue

  x = max(l)
  l.remove(x)
  money += x

print(money)

Fixed submission:
from heapq import heappush, heappop

n, m = map(int, input().split())

w = [[] for _ in range(10**5)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  for item in w[i]:
    heappush(l, item * (-1))
  if len(l) == 0:
    continue

  money += heappop(l) * (-1)

print(money)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

w = [[] for _ in range(10001)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  l += w[i]
  if len(l) == 0:
    continue

  x = max(l)
  l.remove(x)
  money += x

print(money)

Fixed submission:
from heapq import heappush, heappop

n, m = map(int, input().split())

w = [[] for _ in range(10**5)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  for item in w[i]:
    heappush(l, item * (-1))
  if len(l) == 0:
    continue

  money += heappop(l) * (-1)

print(money)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

w = [[0] for _ in range(10000)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  l += w[i]
  if len(l) == 0:
    continue
  
  x = max(l)
  l.remove(x)
  money += x

print(money)

Fixed submission:
from heapq import heappush, heappop

n, m = map(int, input().split())

w = [[] for _ in range(10**5)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  for item in w[i]:
    heappush(l, item * (-1))
  if len(l) == 0:
    continue

  money += heappop(l) * (-1)

print(money)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

w = [[0] for _ in range(10000)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  l += w[i]
  x = max(l)
  l.remove(x)
  money += x

print(money)

Fixed submission:
from heapq import heappush, heappop

n, m = map(int, input().split())

w = [[] for _ in range(10**5)]

for i in range(n):
  a, b = map(int, input().split())
  w[a-1].append(b)

money = 0
l = []
for i in range(m):
  for item in w[i]:
    heappush(l, item * (-1))
  if len(l) == 0:
    continue

  money += heappop(l) * (-1)

print(money)
Buggy python submission (verdict: Runtime Error):
import math import ceil

n, d = map(int, input().split())

t = 2d + 1

print(ceil(n/t))

Fixed submission:
from math import ceil

n, d = map(int, input().split())

t = 2 * d + 1

print(ceil(n/t))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3

from itertools import product
from collections import Counter

def main():
  n = int(input())
  x = []
  y = []

  if n == 1:
    print(1)
    return

  for i in range(n):
    x_tmp, y_tmp = map(int, input().split(' '))
    x.append(x_tmp)
    y.append(y_tmp)

  cnt = Counter()

  for i, j in product(range(n), 2):
    dist = (x[i] - x[j], y[i]- y[j])
    cnt[dist] += 1

  dist, c = cnt.most_common(1)[0]
  print(n - c)

if __name__ == '__main__':
  main()

Fixed submission:
#!/usr/bin/python3

from itertools import permutations
from collections import Counter

def main():
  n = int(input())
  x = []
  y = []

  if n == 1:
    print(1)
    return

  for i in range(n):
    x_tmp, y_tmp = map(int, input().split(' '))
    x.append(x_tmp)
    y.append(y_tmp)

  cnt = Counter()

  for i, j in permutations(range(n), 2):
    dist = (x[i] - x[j], y[i]- y[j])
    cnt[dist] += 1

  dist, c = cnt.most_common(1)[0]
  print(n - c)

if __name__ == '__main__':
  main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3

from itertools import combinations
from collections import Counter

n = int(input())
x = []
y = []

for i in range(n):
  x_tmp, y_tmp = map(int, input().split(' '))
  x.append(x_tmp)
  y.append(y_tmp)

cnt = Counter()

for i, j in combinations(range(n), 2):
  dist = (x[i] - x[j], y[i]- y[j])
  cnt[dist] += 1

dist, c = cnt.most_common(1)[0]
print(n - c)

Fixed submission:
#!/usr/bin/python3

from itertools import permutations
from collections import Counter

def main():
  n = int(input())
  x = []
  y = []

  if n == 1:
    print(1)
    return

  for i in range(n):
    x_tmp, y_tmp = map(int, input().split(' '))
    x.append(x_tmp)
    y.append(y_tmp)

  cnt = Counter()

  for i, j in permutations(range(n), 2):
    dist = (x[i] - x[j], y[i]- y[j])
    cnt[dist] += 1

  dist, c = cnt.most_common(1)[0]
  print(n - c)

if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
A=input() 
a=int(A)
B=input() 
b=int(B)
K=(b+a)/2
k=int(K)
if((b+a)%2==0):
    print(k)
if((b+a)%2!=0):
    print("IMPOSSIBLE")


Fixed submission:
A,B=input().split()
a=int(A)
b=int(B)
K=(b+a)/2
k=int(K)
if((b+a)%2==0):
    print(k)
if((b+a)%2!=0):
    print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
S = int(input())
A = input()
z = ''
arr1 = [i for i in A.split(' ')]
for i in range(S):
	for j in range(i+1, S):
		if(arr1[i]==arr1[j]):
			z = 'NO'
			break
if(z=='NO'):
	print(z)
else:
	print('YES')

Fixed submission:
n = int(input())
arr = [int(n) for n in input().split()]
_set = set()
for i in range(0, n):
    _set.add(arr[i])
print("YES") if len(_set) == len(arr) else print("NO")
Buggy python submission (verdict: Runtime Error):
s = input()
arr = [int(i) for i in s.split('')]
result = 0
for j in range(arr):
  result += arr[j]
if(result>=22):
  print("bust")
else:
  print("win")

Fixed submission:
a,b,c = map(int,input().split())
if a+b+c>= 22:
  print("bust")
else:
  print("win")
Buggy python submission (verdict: Runtime Error):
i = input()

if i % 2 == 0:
    print(i)
else:
    print(i*2)

Fixed submission:
i = int(input())

if i % 2 == 0:
    print(i)
else:
    print(i*2)
Buggy python submission (verdict: Runtime Error):
from math import gcd
n=int(input())
l=list(map(int,input().split()))
b=0
c=0
for i in range(n):
    if (i==0):
        b=l[i]
    else:
        b=b*l[i]//gcd(l[i],b)
for i in range(n):
    c+=b//l[i]
print(c%1000000007)


Fixed submission:
import fractions
n=int(input())
l=list(map(int,input().split()))
b=0
c=0
for i in range(n):
    if (i==0):
        b=l[i]
    else:
        b=b*l[i]//fractions.gcd(l[i],b)
for i in range(n):
    c+=b//l[i]
print(c%1000000007)
Buggy python submission (verdict: Runtime Error):
list=[]
 for i in range(1,10):
    for j in range(1,10):
      list.append(i*j)
a=int(input())
if a in list:
  print('Yes')
else:
  print('No')

Fixed submission:
list=[]
for i in range(1,10):
   for j in range(1,10):
      list.append(i*j)
a=int(input())
if a in list:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
if len(set(A)) == N:
    print('YES')
else:
    print('NO')

Fixed submission:
if __name__ == "__main__":
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

if U == S:
    A -= 1
else:
    B -= 1
print(A, B)

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

if c == a[0]:
  print(b[0]-1)
if U == S:
    A -= 1
else:
    B -= 1
print(A, B)

Fixed submission:
if __name__ == "__main__":
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

if U == S:
    A -= 1
else:
    B -= 1
print(A, B)
Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
  
if len(set(A)) == len(N):
    print('Yes')
else:
    print('No')

Fixed submission:
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
if len(A) == len(set(A)):
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
  
f len(set(A)) == len(A):
    print('Yes')
else:
    print('No')

Fixed submission:
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
if len(A) == len(set(A)):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if 500 * K >= X:
    print('Yes')
else:
    print('No')

Fixed submission:
K, X = map(int, input().split(' '))

if 500 * K >= X:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()

if n % 2 != 0:
    print("No")
elif s[0:(n/2)] == s[(n/2):n]:
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
s = input()

if n % 2 != 0:
    print("No")
elif s[0:(n//2)] == s[(n//2):n]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import copy

K,N = map(int, input().split())
An = list(map(int, input().split()))
ans = [max(An) - min(An)]
for i in range(int(len(An)/2),len(An)):
    A_list = copy.copy(An)
    A_list[i] = A_list[i]-K
    ans.append(max(A_list) - min(A_list))
print(min(ans))

Fixed submission:
import numpy as np

K,N = map(int, input().split())
An = list(map(int, input().split()))
arr = np.array(An)
arr = np.diff(arr)
ans = list(arr)
ans.append(K-An[-1]+An[0])
# print(ans)
ans.remove(max(ans))
print(sum(ans))

Buggy python submission (verdict: Runtime Error):
import copy

K,N = map(int, input().split())
An = list(map(int, input().split()))
ans = [max(An) - min(An)]
for i in range(len(An)/2,len(An)):
    A_list = copy.copy(An)
    A_list[i] = A_list[i]-K
    ans.append(max(A_list) - min(A_list))
print(min(ans))

Fixed submission:
import numpy as np

K,N = map(int, input().split())
An = list(map(int, input().split()))
arr = np.array(An)
arr = np.diff(arr)
ans = list(arr)
ans.append(K-An[-1]+An[0])
# print(ans)
ans.remove(max(ans))
print(sum(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import copy

K,N = map(int, input().split())
An = list(map(int, input().split()))
ans = [max(An) - min(An)]
for i in range(len(An)):
    A_list = copy.copy(An)
    A_list[i] = A_list[i]-K
    ans.append(max(A_list) - min(A_list))
print(min(ans))

Fixed submission:
import numpy as np

K,N = map(int, input().split())
An = list(map(int, input().split()))
arr = np.array(An)
arr = np.diff(arr)
ans = list(arr)
ans.append(K-An[-1]+An[0])
# print(ans)
ans.remove(max(ans))
print(sum(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
lr = [list(map(int, input().split())) for _ in range(m)]
ans = list(range(lr[0][0], lr[0][1]+1))
for l, r in lr:
    # print(ans, set(range(l, r+1)))
    ans = list(set(ans) & set(range(l, r+1)))
print(len(ans))


Fixed submission:
import sys
n, m = map(int, input().split())
lr = [list(map(int, input().split())) for _ in range(m)]
min_gate = 0
max_gate = sys.maxsize
for l, r in lr:
    min_gate = max(min_gate, l)
    max_gate = min(max_gate, r)
print(max(0, max_gate - min_gate + 1))
Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split())
print(a[1]//a[0]*(a[2]+0.5))

Fixed submission:
a = list(map(int, input().split()))
print(a[2]//a[0] * a[1])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
count = 0
s = s + "a"
while True:
    if "01" in s:
        s = s.replace("01", "", 1)
        count += 2
    elif "10" in s:
        s = s.replace("10", "", 1)
        count += 2
    else:
        break
print(count)


Fixed submission:
s = input()
cube_list = [s[0]]
s = s[1:]
count = 0
for c in s:
    if cube_list:
        if cube_list[-1] == c:
            cube_list.append(c)
        else:
            count += 2
            cube_list.pop(-1)
    else:
        cube_list.append(c)
print(count)
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())
a = [0, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1]
if a[x] == a[y]:
    print("Yes")
else:
    print("No")

Fixed submission:
x, y = map(int, input().split())
a = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]
if a[x] == a[y]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
import math
import re

a = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy":"Sunny"}

print a[input()]


Fixed submission:
import sys
import math
import re

a = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy":"Sunny"}

print(a[input()])
Buggy python submission (verdict: Runtime Error):
-a+(b+c)

Fixed submission:
a,b,c=map(int,input().split())
ans = -a+(b+c)
if ans>0:
    print(ans)
else:print(0)
Buggy python submission (verdict: Runtime Error):
import math
n,k = map(int,input().split())

ret=0

for i in range(1,n+1):
    p=math.ceil(math.log2(k/i))
    p=p if p>0 else 0
    ret+=math.pow(0.5,p)/n

print(ret)


Fixed submission:
import math
n,k = map(int,input().split())

ret=0

for i in range(1,n+1):
    p=math.ceil(math.log2(k/i))
    p=p if p>0 else 0
    ret+=math.pow(0.5,p)/n

ret=math.floor(ret*1e12)*1e-12
print(ret)