Buggy python submission (verdict: Runtime Error):
N = int(input())
stlist = []
bf = 0
al = 0
ab = 0
ba = 0
for i in range(N):
    tmp = input()
    ab += tmp.count("AB")
    if tmp[0] == 'B' and tmp[-1] == 'A':
        ba += 1
    elif tmp[0] =='B':
        bf+=1
    elif tmp[-1] =='A':
        al+=1
if al == 0 and bf ==0:
    print(ba-1+ab)
elif al * bf ==0:
    print(min(al-1, bf-1, 0) + ba + ab)
else:
    print(min(al-1, bf-1, 0) + ba +1 + ab)

Fixed submission:
a = raw_input().split()
print(int(a[0])-int(a[1])+1)

Buggy python submission (verdict: Runtime Error):
a = raw_input().split()
print(int(a[0])-int(a[1])+1)

Fixed submission:
a = raw_input().split()
print(int(a[0])-int(a[1])+1)

Buggy python submission (verdict: Runtime Error):
a = raw_input().split()
print(a[0]-a[1]+1)

Fixed submission:
a = raw_input().split()
print(int(a[0])-int(a[1])+1)

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break


Fixed submission:
t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break

Buggy python submission (verdict: Runtime Error):
from pip._vendor.distlib.compat import raw_input

l = raw_input().split()
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break


Fixed submission:
t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break

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

N = int(sys.argv[1])
K = int(sys.argv[2])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break


Fixed submission:
t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break

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

if __name__ == "__main__":
    N = int(sys.argv[1])
    K = int(sys.argv[2])
    count = 0
    numbers = list(range(1, N+1))
    while True:
        if len(numbers) >= K:
            numbers.pop(0)
            count = count + 1
        else:
            print(count)
            break


Fixed submission:
t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break

Buggy python submission (verdict: Runtime Error):
return 1

Fixed submission:
t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break

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

print(N+1-k)


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

print(N+1-K)