Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def circle(r):
  return r**2

str = input()
print(circle(str))

Fixed submission:
def circle(r):
    return r**2
str = int(input())
print(circle(str))

Buggy python submission (verdict: Runtime Error):
def circle(r):
  return r**2

str = input()
circle(str)

Fixed submission:
def circle(r):
    return r**2
str = int(input())
print(circle(str))
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
L = [0]*M
R = [0]*M
for i in range(M):
    L[i],R[i] = map(int,input().split())

a = [0]*M

for j in range(M):
    a[j] = set(range(L[j],R[j]+1))

origin = set(range(1,N+1))
for k in range(M):
    origin &= a[k]

print(len(origin))

Fixed submission:
N,M = map(int,input().split())
L = [0]*M
R = [0]*M
for i in range(M):
    L[i],R[i] = map(int,input().split())

min = L[0]
max = R[0]

for j in range(1,M):
    if min < L[j]:
        min = L[j]
    if max > R[j]:
        max = R[j]
if max-min+1 >= 0:
	print(max-min+1)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
#B = [0]*N

S = - K + Q
for i in range(N):
    if A.count(i+1) > S :
      #  B[i] += S + A.count(i+1)

#    if B[i] > 0:
        print("Yes")
    else:
        print("No")



Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(Q):
    B[A[i]-1] += 1
    
for i in range(N):
#if A.count(i+1) > S :
#      B[i] += S + A.count(i+1)

    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [0]*N

S = K - Q
for i in range(N):
    B[i] += S + A.count(i+1)

#for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")



Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(Q):
    B[A[i]-1] += 1
    
for i in range(N):
#if A.count(i+1) > S :
#      B[i] += S + A.count(i+1)

    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [0]*N

for i in range(N):
    B[i] += K - Q + A.count(i+1)

#for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")



Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(Q):
    B[A[i]-1] += 1
    
for i in range(N):
#if A.count(i+1) > S :
#      B[i] += S + A.count(i+1)

    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(N):
    B[i] += A.count(i+1)

#for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")



Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(Q):
    B[A[i]-1] += 1
    
for i in range(N):
#if A.count(i+1) > S :
#      B[i] += S + A.count(i+1)

    if B[i] > 0:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(N-1):
    B[i] += A.count(i+1)

for i in range(N):
    if B[i] > 0:
        print("Yes")
    else:
        print("No")



Fixed submission:
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [K-Q]*N

for i in range(Q):
    B[A[i]-1] += 1
    
for i in range(N):
#if A.count(i+1) > S :
#      B[i] += S + A.count(i+1)

    if B[i] > 0:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
d = [int(input()) for i in range(N)]

print(list(set(d)))
e = list(set(d))
print(len(e))
N = int(input())
d = [int(input()) for i in range(N)]

# print(list(set(d)))
e = list(set(d))
print(len(e))


Fixed submission:
N = int(input())
d = [int(input()) for i in range(N)]

# print(list(set(d)))
e = list(set(d))
print(len(e))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if (a > 0 and a <= 9) or (b > 0 and b <=9):
	print("{}".a*b)
 else:
	print("-1")
  

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

if (a > 0 and a <= 9) and (b > 0 and b <=9):
	print(a*b)
else:
	print("-1")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())

res = list()

strings = [chr(ord('a').upper() + i) for i in range(26)]
for s in S:
  ind = strings.index(s) + N
  res.append(strings[ind % len(strings)])
  
print(''.join(map(str, res)))

Fixed submission:
N = int(input())
S = str(input())
 
res = list()
 
strings = [chr(i) for i in range(65, 65+26)]
for s in S:
  ind = strings.index(s) + N
  res.append(strings[ind % len(strings)])
  
print(''.join(map(str, res)))
Buggy python submission (verdict: Runtime Error):
r = int(input().split())

print(int(r*r))

Fixed submission:
r = int(input())
 
print(r*r)

Buggy python submission (verdict: Runtime Error):
r = int(input().split())

print(r**2)

Fixed submission:
r = int(input())
 
print(r*r)
Buggy python submission (verdict: Runtime Error):
from itertools import combinations
 
N = int(input())
d = list(map(int(input().split())))
 
score = 0
for i,j in combinations(range(N), 2):
  score += d[i] * d[j]
print(score)

Fixed submission:
from itertools import combinations
 
N = int(input())
d = list(map(int, input().split()))
 
score = 0
for i,j in combinations(range(N), 2):
  score += d[i] * d[j]
print(score)

Buggy python submission (verdict: Runtime Error):
from itertools import combinations

N = int(input())
d = map(int(input().split()))

score = 0
for i,j in combinations(range(N), 2):
  score += d[i] * d[j]

print(score)
  

Fixed submission:
from itertools import combinations
 
N = int(input())
d = list(map(int, input().split()))
 
score = 0
for i,j in combinations(range(N), 2):
  score += d[i] * d[j]
print(score)
Buggy python submission (verdict: Runtime Error):
import bisect

# LIS
N = int(input())
L = list(map(int, input().split()))
L.sort()

# shorter first
# c > b >a
for i in range(0, N-2):
  for j in range(i+1, N-1):
    index = bisect.bisect_left(L, L[i]+L[j])
    count += max(0, index-(j+1))

Fixed submission:
import bisect

# LIS
N = int(input())
L = list(map(int, input().split()))
L.sort()

# shorter first
# c > b >a
count = 0
for i in range(0, N-1):
  for j in range(i+1, N):
    index = bisect.bisect_left(L, L[i]+L[j])
    count += max(0, index-(j+1))
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
D = list(map(int, input().split()))
 
D = sorted(D)
max_ = max(D)
min_ = min(D)
 
middle_idx = len(D)//2
print("mi", middle_idx)
diff = D[middle_idx+1] - D[middle_idx]
print(diff)

Fixed submission:
N = int(input())
D = list(map(int, input().split()))
 
D = sorted(D)
max_ = max(D)
min_ = min(D)

middle_idx = len(D)//2
 
diff = D[middle_idx] - D[middle_idx-1]
print(diff)

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

D = sorted(D)
max_ = max(D)
min_ = min(D)

middle_idx = len(D)//2

diff = D[middle_idx+1] - D[middle_idx]
print(diff)

  
  
  
  

Fixed submission:
N = int(input())
D = list(map(int, input().split()))
 
D = sorted(D)
max_ = max(D)
min_ = min(D)

middle_idx = len(D)//2
 
diff = D[middle_idx] - D[middle_idx-1]
print(diff)
Buggy python submission (verdict: Runtime Error):
code = str(input())

for i, s in enumerate(code):
  if i != 0:
  	if s == pre:
      print("Bad")
      exit()
  pre = s
  
print("Good")


Fixed submission:
code = str(input())

for i, s in enumerate(code):
    if i != 0:
        if s == pre:
            print("Bad")
            exit()
    pre = s

print("Good")
Buggy python submission (verdict: Runtime Error):
P, Q, R = map(int, input().split())
times = [P, Q, R]
from itertools import combinations
 
min_ = 200
for i in combinations(times, r=2):
  j = sum(i)
  if j < max_:
    min_ = j

print(min_)

Fixed submission:
P, Q, R = map(int, input().split())
times = [P, Q, R]
from itertools import combinations
 
min_ = 200
for i in combinations(times, r=2):
  j = sum(i)
  if j < min_:
    min_ = j
print(min_)
Buggy python submission (verdict: Runtime Error):
N = int(input())
W = list(map(int, input().split()))
 
def calc_sum(W, T):
  S1 = sum(W[:T])
  S2 = sum(W[T:])
  return S1, S2
 
def calc_abs(S1, S2):
  return abs(S1-S2)
  
min_ = 1000
for i in range(len(W)):
  S1, S1 = calc_sum(W, i)
  j = calc_abs(S1, S2)
  if j < min_:
    min_ = j
    
print(min_)

Fixed submission:
N = int(input())
W = list(map(int, input().split()))
 
def calc_sum(W, T):
  S1 = sum(W[:T])
  S2 = sum(W[T:])
  return S1, S2
 
def calc_abs(S1, S2):
  return abs(S1-S2)
  
min_ = 1000
for i in range(len(W)):
  S1, S2 = calc_sum(W, i)
  j = calc_abs(S1, S2)
  if j < min_:
    min_ = j
    
print(min_)

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

def calc_sum(W, T):
  S1 = sum(W[:T])
  S2 = sum(W[T:])
  return S1, S2

def calc_abs(S1, S2):
  return abs(S1-S2)
  
min_ = 1000
for i in range(len(W)):
  S1, S1 = calc_sum(W, i)
  j = calc_abs(S1, S2)
  if j < min_:
    min_ = j
    
print(min_)

Fixed submission:
N = int(input())
W = list(map(int, input().split()))
 
def calc_sum(W, T):
  S1 = sum(W[:T])
  S2 = sum(W[T:])
  return S1, S2
 
def calc_abs(S1, S2):
  return abs(S1-S2)
  
min_ = 1000
for i in range(len(W)):
  S1, S2 = calc_sum(W, i)
  j = calc_abs(S1, S2)
  if j < min_:
    min_ = j
    
print(min_)
Buggy python submission (verdict: Runtime Error):
import sys
from sys import stdin
import numpy as np

N, M = map(int, input().split())
L, R - list(), list()
for i in range(M):
  l,r = stdin.readline().rstrip().split()
  L.append(int(l))
  R.append(int(r))

inputs = np.vstack(L, R).T
  
count = 0
for i in range(1, N+1):
  out = (inputs[:, 0] >= i) & (inputs[:, 1] <= i)
  if out.all():
    count += 0
  
print(count)
  

Fixed submission:
import sys
from sys import stdin
import numpy as np

N, M = map(int, input().split())
L, R = list(), list()
for i in range(M):
  l,r = stdin.readline().rstrip().split()
  L.append(int(l))
  R.append(int(r))

L = np.array(L)
R = np.array(R)

if R.min() - L.max() < 0:
  print(0)
else:
  print(R.min() - L.max() + 1)
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())

for s in N+1:
  for g in (N-s):
    i = N - s - g
    if 1000*s + 5000*g + i*10000 == Y:
      print(s, g, i, sep=" ")
      exit()
print(-1, -1, -1, sep=" ")


Fixed submission:
N, Y = map(int, input().split())
 
for s in range(N+1):
  for g in range(N-s+1):
    i = N - s - g
    if 1000*s + 5000*g + i*10000 == Y:
      print(i, g, s, sep=" ")
      exit()
print(-1, -1, -1, sep=" ")

Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())
# Nマイ，Y縁
s, g, i

for s in N+1:
  for g in (N-s):
    i = N - s - g
    if 1000*s + 5000*g + i*10000 == Y:
      print(s, g, i, sep=" ")
      exit()
print(-1, -1, -1, sep=" ")


Fixed submission:
N, Y = map(int, input().split())
 
for s in range(N+1):
  for g in range(N-s+1):
    i = N - s - g
    if 1000*s + 5000*g + i*10000 == Y:
      print(i, g, s, sep=" ")
      exit()
print(-1, -1, -1, sep=" ")
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
 
count = 0
for x in range(S+1):
  # print("x", x)
  for y in range(S-x+1):
    # print("y" , y)
    z = S - x - y
    # print("z", z)
    if (x>=0 and x<=K) and (y>=0 and y<=K) and (z>=0 and z<=K):
      count += 1
      
print(count)

Fixed submission:
K, S = map(int, input().split())
 
count = 0

for x in range(K+1):
  for y in range(K+1):
    z = S - x - y
    if (z>=0) and (z<=K):
      count += 1

print(count)

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

count = 0
for x in K+1:
  for y in K-x:
    z = K - x - y
    if (x>=0) and (y>=0) and (z>=0):
      count += 1
      
print(count)

Fixed submission:
K, S = map(int, input().split())
 
count = 0

for x in range(K+1):
  for y in range(K+1):
    z = S - x - y
    if (z>=0) and (z<=K):
      count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
  exit()
if a<3:
  rb += r[a]
if b<3:
  ra += r[b]
 
print(ra)

Fixed submission:
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
else:
    if a<4:
      ra += r[a-1]
    if b<4:
      ra += r[b-1]
    print(ra)

Buggy python submission (verdict: Runtime Error):
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
  exit()
if a<4:
  rb += r[a]
if b<4:
  ra += r[b]

print(ra)

Fixed submission:
a,b = list(map(int, input().split()))
r=[300000, 200000, 100000]
ra=0
if a+b==2:
  print('1000000')
else:
    if a<4:
      ra += r[a-1]
    if b<4:
      ra += r[b-1]
    print(ra)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input.split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in tqdm(range(0,N)):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(result)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
mindif = 1e15
minidx=0
for i in range(1,N):
    dif = abs(sum(a[:i])-sum(a[i:]))
    if dif<mindif:
        mindif = dif
        minidx = i
    else:
        break
print(mindif)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
mindif = 1e100
minidx=0
for i in range(1,N):
    dif = abs(sum(a[:i])-sum(a[i:]))
    if dif<mindif:
        mindif = dif
        minidx = i
    else:
        break
print(mindif)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))
Buggy python submission (verdict: Time Limit Exceeded):
l=list(input() for i in range(3))
tn =0
while len(l[tn])>0:
    if l[tn][0]=="a":
        l[tn]=l[tn][1:]
        tn=0
    elif l[tn][0]=="b":
        l[tn]=l[tn][1:]
        tn=1
    elif l[tn][0]=="c":
        l[tn]=l[tn][1:]
        tn=2
if tn==0:
    print("A")
elif tn==1:
    print("B")
elif tn==2:
    print("C")


Fixed submission:
a, b, h=map(int, list(input() for i in range(3)))
print((a+b)*h//2)

Buggy python submission (verdict: Time Limit Exceeded):
l=list(input() for i in range(3))
tn =0
while len(l[tn])>0:
    if l[tn][0]=="a":
        l[tn]=l[tn][1:]
        tn=0
    elif l[tn][0]=="b":
        l[tn]=l[tn][1:]
        tn=1
    elif l[tn][0]=="c":
        l[tn]=l[tn][1:]
        tn=2
if tn==0:
    print("A")
elif tn==1:
    print("B")
elif tn==2:
    print("C")


Fixed submission:
a, b, h=map(int, list(input() for i in range(3)))
print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
lis=list(map(int, list(input() for i in range(3)))

tn=0

while len(l[tn])>0:
    if l[tn][0]=="a":
        l[tn]=l[tn][1:]
        tn=0
    elif l[tn][0]=="b":
        l[tn]=l[tn][1:]
        tn=1
    elif l[tn][0]=="c":
        l[tn]=l[tn][1:]
        tn=2
if tn==0:
    print("A")
elif tn==1:
    print("B")
elif tn==2:
    print("C")


Fixed submission:
a, b, h=map(int, list(input() for i in range(3)))
print((a+b)*h//2)
Buggy python submission (verdict: Runtime Error):
a,b,c=(int(x) for x in input().split())

if (a+b+c>=22:
    print('bust')
else:
    print('win')



Fixed submission:
a,b,c=(int(x) for x in input().split())

if (a+b+c)>=22:
    print('bust')
else:
    print('win')

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

if (int(A[0])+int(A[2])+int(A[4]))>=22:
    print('bust')
else:
    print('win')



Fixed submission:
a,b,c=(int(x) for x in input().split())

if (a+b+c)>=22:
    print('bust')
else:
    print('win')

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

if (int(A[0])+int(A[2])+int(A[4]))>=22:
    print('burst')
else:
    print('win')



Fixed submission:
a,b,c=(int(x) for x in input().split())

if (a+b+c)>=22:
    print('bust')
else:
    print('win')

Buggy python submission (verdict: Runtime Error):
a1 = int(input())
a2 = int(input())
a3 = int(input())

if a1 + a2 + a3 > 21:
  print('bust')
else:
  print('win')

Fixed submission:
a1, a2, a3 = (int(x) for x in input().split(' '))

if a1 + a2 + a3 > 21:
  print('bust')
else:
  print('win')

Buggy python submission (verdict: Runtime Error):
A=list(map(int,input.split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Fixed submission:
A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Buggy python submission (verdict: Runtime Error):
A=list(map(int(input.split())))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Fixed submission:
A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Buggy python submission (verdict: Runtime Error):
A=map(int(input.split()))
if A+A+A>=22:
  print("bust")
else:
  print("win")

Fixed submission:
A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

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

Fixed submission:
A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Buggy python submission (verdict: Runtime Error):
n = int(input())
print('win' if n <= 21 else 'bust')

Fixed submission:
n = sum(list(map(int, input().split())))
print('win' if n <= 21 else 'bust')
Buggy python submission (verdict: Runtime Error):
s=list(input())
n=len(s)
cnt=0
for i in range(n//2):
  if s[i] != s[n-i]: cnt+=1
print(cnt)

Fixed submission:
s=list(input())
n=len(s)
cnt=0
for i in range(n//2):
  if s[i] != s[n-i-1]: cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=n%100
for i in range(a):
  for j in range(a-i):
    for k in range(a-i-j):
      for l in range(a-i-j-k):
        for m in range(a-i-j-k-l):
          if i+2*j+3*k+4*l+5*m == a:
            print(1)
            return
print(0)


Fixed submission:
import sys
import math

n=int(input())
a=n%100
b=math.floor(n/100)+1
f=True
while b != 0:
  for i in range(b):
    for j in range(b-i):
      for k in range(b-i-j):
        for l in range(b-i-j-k):
          for m in range(b-i-j-k-l):
            if i+2*j+3*k+4*l+5*m == a:
              print(1)
              sys.exit()
  a+=100
  b-=1
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

for i in range(1000):
  for j in range(1000-i):
    for k in range(1000-i-j):
      for l in range(1000-i-j-k):
        for m in range(1000-i-j-k-l):
          for n in range(1000-i-j-k-l-m):
            price = i*100+j*101+k*102+l*103+m*104+n*105
            if price == n:
              print(1)

print(0)


Fixed submission:
import sys
import math

n=int(input())
a=n%100
b=math.floor(n/100)+1
f=True
while b != 0:
  for i in range(b):
    for j in range(b-i):
      for k in range(b-i-j):
        for l in range(b-i-j-k):
          for m in range(b-i-j-k-l):
            if i+2*j+3*k+4*l+5*m == a:
              print(1)
              sys.exit()
  a+=100
  b-=1
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

for i in range(1000):
  for j in range(1000):
    for k in range(1000):
      for l in range(1000):
        for m in range(1000):
          for n in range(1000):
            price = i*100+j*101+k*102+l*103+m*104+n*105
            if price == n:
              print(1)

print(0)

Fixed submission:
import sys
import math

n=int(input())
a=n%100
b=math.floor(n/100)+1
f=True
while b != 0:
  for i in range(b):
    for j in range(b-i):
      for k in range(b-i-j):
        for l in range(b-i-j-k):
          for m in range(b-i-j-k-l):
            if i+2*j+3*k+4*l+5*m == a:
              print(1)
              sys.exit()
  a+=100
  b-=1
print(0)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()

nsl=['{:03}'.format() for i in range(1000)]

res=0
for ns in nsl:
  idx=0
  for char in s:
    if char == ns[idx]:
      idx+=1
      if idx == 3:
        res+=1
        break
print(res)

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

nsl=['{:03}'.format(i) for i in range(1000)]

res=0
for ns in nsl:
  idx=0
  for char in s:
    if char == ns[idx]:
      idx+=1
      if idx == 3:
        res+=1
        break
print(res)
Buggy python submission (verdict: Runtime Error):
a = input()
a = list(a)
b = len(a)
c = b / 2
d = []
for i in range(0,c):
    d.append(a[i])
e = a[::-1]
f = []
for g in range(0,c):
    f.append(e[g])
answer = 0
for h in range(0,c):
    if d[h] != f[h]:
        answer += 1
print(answer)


Fixed submission:
a = input()
a = list(a)
b = len(a)
c = int(b / 2)
d = []
for i in range(0,c):
    d.append(a[i])
e = a[::-1]
f = []
for g in range(0,c):
    f.append(e[g])
answer = 0
for h in range(0,c):
    if d[h] != f[h]:
        answer += 1
print(answer)

Buggy python submission (verdict: Runtime Error):
a = input()
a = list(a)
b = len(a)
c = b / 2
d = []
for i in range(0,c):
    d.append(a[i])
e = a[::-1]
f = []
for g in range(0,c):
    f.append(e[g])
answer = 0
for h in range(0,c):
    if d[h] != f[h]:
        answer += 1
print(answer)


Fixed submission:
a = input()
a = list(a)
b = len(a)
c = int(b / 2)
d = []
for i in range(0,c):
    d.append(a[i])
e = a[::-1]
f = []
for g in range(0,c):
    f.append(e[g])
answer = 0
for h in range(0,c):
    if d[h] != f[h]:
        answer += 1
print(answer)