Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
    import numpy as np
    n=input()
    n=int(n)
    a=input().split()
    b=np.zeros(n)
    div=0
    num_8=0
    for i in range(n):
     a[i]=int(a[i])
     if a[i]<=399 and a[i]>=1:
      b[i]=0
     elif a[i]>=400 and a[i]<=799:
      b[i]=1
     elif a[i]>=800 and a[i]<=1199:
      b[i]=2
     elif a[i]>=1200 and a[i]<=1599:
      b[i]=3
     elif a[i]>=1600 and a[i]<=1999:
      b[i]=4
     elif a[i]>=2000 and a[i]<=2399:
      b[i]=5
     elif a[i]>=2400 and a[i]<=2799:
      b[i]=6
     elif a[i]>=2800 and a[i]<=3199:
      b[i]=7
     else:
      b[i]=8
      num_8=num_8+1
    for i in range(8):
     if i in b:
      div=div+1
    min=div
    max=div+num_8
    if min==0:
     min=1
    print(min,max)

Fixed submission:
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)

Buggy python submission (verdict: Runtime Error):
    import numpy as np
    n=input()
    n=int(n)
    a=input().split()
    b=np.zeros(n)
    div=0
    num_8=0
    for i in range(n):
     a[i]=int(a[i])
     if a[i]<=399 and a[i]>=1:
      b[i]=0
     elif a[i]>=400 and a[i]<=799:
      b[i]=1
     elif a[i]>=800 and a[i]<=1199:
      b[i]=2
     elif a[i]>=1200 and a[i]<=1599:
      b[i]=3
     elif a[i]>=1600 and a[i]<=1999:
      b[i]=4
     elif a[i]>=2000 and a[i]<=2399:
      b[i]=5
     elif a[i]>=2400 and a[i]<=2799:
      b[i]=6
     elif a[i]>=2800 and a[i]<=3199:
      b[i]=7
     else:
      b[i]=8
      num_8=num_8+1
    for i in range(8):
     if i in b:
      div=div+1
    min=div
    max=div+num_8
    if min==0:
     min=1
    print(min,max)

Fixed submission:
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))

b = {}
ans = 0
for i, v in enumerate(a):
    if v > i+1:
        b[i+1] = v
    elif v < i+1:
        if b[v] == i+1:
            ans += 1
print(ans)


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

b = {}
ans = 0
for i, v in enumerate(a):
    if v > i+1:
        b[i+1] = v
    elif v < i+1:
        if v in b and b[v] == i+1:
            ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = list(map(ord, input()))
K = int(input())

asca = 97
ascz = 122
start = 0
lens = len(s)

loop = lambda x: asca if x == ascz else x+1

for k in range(K):
    for i in range(start, lens):
        c = s[i]
        if i == lens - 1:
            s[i] = loop(c)
            break
        if c == asca:
            start += 1
            continue
        v = c + (K-k)
        if v > ascz:
            s[i] = loop(c)
            break
        else:
            continue
print(''.join(map(chr, s)))


Fixed submission:
s = list(map(ord, input()))
K = int(input())

asca = 97
ascz = 122
start = 0
lens = len(s)

loop = lambda x: asca if x == ascz else x+1

for k in range(K):
    if start == lens - 1:
        for i in range((K-k) % (ascz - asca + 1)):
            s[start] = loop(s[start])
        break
    for i in range(start, lens):
        c = s[i]
        if i == lens - 1:
            s[i] = loop(c)
            break
        if c == asca:
            start += 1
            continue
        v = c + (K-k)
        if v > ascz:
            s[i] = loop(c)
            break
        else:
            continue
print(''.join(map(chr, s)))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, K = map(int,input().split())

A = []

while True:
    a, b = map(int,input().split())
    B = [a for j in range(b)]
    A.extend(B)
    if len(A) >= K:
        print(A[K-1])
        break

Fixed submission:
# -*- coding: utf-8 -*-

a, b, c = map(int,input().split())

if c>=a and c<=b:
    print ("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)
    
for i in range(0,M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for i in range(0,N):
    print(street[i])

Fixed submission:
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = [0 for i in range(N)]

for i in range(M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for s in street:
    print(s)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)

for i in range(0,M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for i in range(0,N):
    print(street[i])


Fixed submission:
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = [0 for i in range(N)]

for i in range(M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for s in street:
    print(s)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)

for i in range(0,M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for i in range(0,N):
    print(street[i])


Fixed submission:
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = [0 for i in range(N)]

for i in range(M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for s in street:
    print(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(append(map(int,input().split)))
print(max(a) - min(a))


Fixed submission:
N = int(input())
a = list(map(int,input().split()))
print(max(a) - min(a))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
count = 0
for i in range(max(A)):
    if A.count(i+1) > 0:
        count += A.count(i+1) -1
N = N - 2*(count // 2 + count % 2)
print(N)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
count = [0]*max(A)
for i in A:
    count[i-1] += 1
count = [i for i in count if i != 0]
count = sum(count) - len(count)
N = N - 2*(count // 2 + count % 2)
print(N)
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int,input().split());
X[N] = map(int,input().split);

for i in range(N-1):
    dist[i] = X[i+1]-X[i];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i * A;
    else:
        fatigue += B;

print(fatigue);


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

dist =[X[i+1]-X[i] for i in range(N-1)];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i*A;
    else:
        fatigue += B;

print(fatigue);
Buggy python submission (verdict: Runtime Error):
a, b, x = map(int,input().split())
N = 0
if a%x ==0:
    N = int((b-a)//x)+1
else:
    c = a + (x-a%x)
    if b>=c:
        N = int((b-c)//x)+1
print(N)

Fixed submission:
s = input()
A = 'A' + s[8] + 'C'
print(A)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int,input().split())
N = 0
for i in range(a, b+1):
    if i % x == 0:
        N = N + 1
print(N)

Fixed submission:
a, b, x = map(int,input().split())
N = 0
if a%x ==0:
    N = int((b-a)//x)+1
else:
    c = a + (x-a%x)
    if b>=c:
        N = int((b-c)//x)+1
print(N)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
B = []
Nc = 0

while S != 'W'*len(S) and S != 'B'*len(S):
    if S.index('B') > S.index('W'):
        S = S.replace('W','B',S.index('B'))
        Nc += 1
    else:
        S = S.replace('B','W',S.index('W'))
        Nc += 1
print(Nc)

Fixed submission:
S = input()
B = []
Nc = 0

for i in range(len(S)-1):
    if S[i] != S[i+1]:
        Nc += 1
print(Nc)

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
B = []
Nc = 0
Ns = 0
for i in range(len(S)):
    if S[i] == 'W':
        B.append(1)
    if S[i] == 'B':
        B.append(0)

while B != [1]*len(B) and B != [0]*len(B):
    if B.index(0) > B.index(1):
        B = [1] + B
        B[0:B.index(0)+1] = [0]*(B.index(0)+1)
        Nc += 1
    else:
        B = [0] + B
        B[0:B.index(1)+1] = [1]*(B.index(1)+1)
        Nc += 1
print(Nc)

Fixed submission:
S = input()
B = []
Nc = 0

for i in range(len(S)-1):
    if S[i] != S[i+1]:
        Nc += 1
print(Nc)
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = T[0]
An = A[0]
for i in range(N):
        tmp = math.ceil(max(Tn / T[i], An / A[i]))
        Nb = (T[i] + A[i])*tmp
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Nb)

Fixed submission:
a, b, c = map(int,input().split())
list = [a, b, c]
N = len(set(list))
print(N)
Buggy python submission (verdict: Runtime Error):
N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = 1
An = 1
for i in range(N):
        tmp = max(math.ceil(Tn / T[i]), math.ceil(An / A[i]))
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Tn + An)

Fixed submission:
N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = 1
An = 1
for i in range(N):
        tmp = max((Tn+T[i]-1) // T[i], (An+A[i]-1) // A[i])
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Tn + An)
Buggy python submission (verdict: Runtime Error):
A,B = input().split(" ")
if A+B >= 10:
    print("error")
else:
    print(A+B)

Fixed submission:
A,B = map(int, input().split(" "))
if A+B >= 10:
    print("error")
else:
    print(A+B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
data = input().split()

output = int(max(data)) - int(min(data))
print(output)

Fixed submission:
r, g, b = map(int, input().split())
rgb = r * 100 + g * 10 + b
if rgb % 4 == 0:
    output = "YES"
else:
    output = "NO"
print(output)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [input() for i in range(N)]

output = int(max(a)) - int(min(a))
print(output)

Fixed submission:
N = int(input())
data = input().split()

output = int(max(data)) - int(min(data))
print(output)
Buggy python submission (verdict: Runtime Error):
import math

ranks = [False for i in range(8)]
highs = 0
n = int(input())
inps = [int(i) for i in input().split()]
highs = min(len([i for i in inps if i > 3199]), 8)
inps = [i for i in inps if i <= 3199]
for i in inps:
    ranks[math.floor(i/399)] = True

lows = len([i for i in ranks if i == True]) 

minimum = max(lows, 1)
maximum = lows + highs

print(minimum, maximum)


Fixed submission:
inps = [i for i in input().split()]
sorted(inps)
inpsS = "".join(inps)
inpsI = int(inpsS)
if inpsI % 4 == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
import sys

l_1 = [1,3,5,7,8,10,12]
l_2 = [4,6,9,11]

x, y = map(int, input().split())

if x == 2:
    if y == 2:
        print("yes")
    else:
        print("no")
elif x in l_1:
    if y in x_1:
        print("yes")
    else:
        print("no")
else x in l_2:
    if y in l_2:
        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

l_1 = [1,3,5,7,8,10,12]
l_2 = [4,6,9,11]

x,y = map(list(int,input()).split())

if x == 2:
    if y == 2:
        print("yes")
    else:
        print("no")
elif x in l_1:
    if y in x_1:
        print("yes")
    else:
        print("no")
else x in l_2:
    if y in l_2:
        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):
l_1 = [1,3,5,7,8,10,12]
l_2 = [4,6,9,11]
l_3 = [2]

x,y = map(list(int,input()).split())

if x == 2:
    if y == 2:
        print("yes")
    else:
        print("no")
elif x in l_1:
    if y in x_1:
        print("yes")
    else:
        print("no")
else x in l_2:
    if y in l_2:
        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):
O = input()
E = input()
X = ""

for i in range(len(E)):
    X += (O[i] + E[i])

if len(O) != len(E):
    X += O[-1]
    
print(X)
    

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

if b - a == c - b:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,raw_input().split())
c=[]
for i in range(N):
	a,b=map(int,raw_input().split())
	c+=[a]*b

c.sort()
print c[K-1]

Fixed submission:
N,K=map(int,raw_input().split())
c=[0]*N
for i in range(N):
	a,b=map(int,raw_input().split())
	c[i]=(a,b)
c.sort()
i,j=0,0
while i<=K-1:
	i+=c[j][1]
	if i>=K:break
	j+=1
print c[j][0]
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
i = 0
for i in range(len(a)):
    print(a[i], end = '')
    if i == len(b):
        break
    print(b[i], end = '')

Fixed submission:
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
if b - a == c - b:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
n = len(b)
x = 0
i = 0
j = 0
while (x < n * 2):
    if x % 2:
        print(b[i], end = '')
        i += 1
    else:
        print(a[j], end = '')
        j += 1
    x += 1
print('')

Fixed submission:
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
if b - a == c - b:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
#!/bin/usr/python

n = input()

s = [0 for i in range(100)]
a = 0

for i in range(n):
  s[i] = input()
  a += s[i]

flag = True
if a % 10 == 0:
  s = sorted(s)
  for i in range(n):
    if s[-1*n + i] % 10 != 0:
      a -= s[-1*n + i]
      break

if a % 10 == 0:
  a = 0

print(a)

Fixed submission:
#!/bin/usr/python

n = input()

s = [0 for i in range(100)]
a = 0

for i in range(n):
  s[i] = input()
  a += s[i]

flag = True
if a % 10 == 0:
  s = sorted(s)
  for i in range(n):
    if s[-1*n + i] % 10 != 0:
      a -= s[-1*n + i]
      break

if a % 10 == 0:
  a = 0

print(a)
Buggy python submission (verdict: Runtime Error):
import heapq

n = int(input())
a = list(map(int, input().split()))

red, blue = a[:n], [-1*i for i in a[2*n:]]
sr, sb = sum(red), sum(blue)

results = [0] * (n + 1)
results[0] = sr
results[-1] = sb

heapq.heapify(red)
heapq.heapify(blue)

for k in range(n, 2*n):
    v = a[k]
    p = heapq.heappushpop(red, v)
    sr += v - p
    results[i-n+1] += sr

for k in range(2*n-1, n-1, -1):
    v = -1 * a[k]
    p = heapq.heappushpop(blue, v)
    sb += v - p
    results[i-n] += sb

print(max(results))


Fixed submission:
import heapq

n = int(input())
a = list(map(int, input().split()))

red, blue = a[:n], [-1*i for i in a[2*n:]]
sr, sb = sum(red), sum(blue)

results = [0] * (n + 1)
results[0] = sr
results[-1] = sb

heapq.heapify(red)
heapq.heapify(blue)

for k in range(n, 2*n):
    v = a[k]
    p = heapq.heappushpop(red, v)
    sr += v - p
    results[k-n+1] += sr

for k in range(2*n-1, n-1, -1):
    v = -1 * a[k]
    p = heapq.heappushpop(blue, v)
    sb += v - p
    results[k-n] += sb

print(max(results))
Buggy python submission (verdict: Runtime Error):
a =  int(input())
b = int(input())


ans = a + b
if ans >= 10:
        print("error")
else :
        print(ans)


Fixed submission:
ilist =  input().split(" ")
ans = int(ilist[0]) + int(ilist[1] )
if ans >= 10:
        print("error")
else :
        print(ans)

Buggy python submission (verdict: Runtime Error):
s = input()
c = 0

#check for constraints
if 2<=len(s) and len(s) <= 26:
    s2 = ''.join(sorted(s))
    for i in s2:
        if c > len(s):
            quit()
        if s2[c] == s2[c+1]:
            print("no")  # string is not unique
            quit()
        elif s2[c] != s2[c+1]:
            c = c + 1
else: quit()

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

total = A+B

if A >= 1 and B <=9 :
    if total < 10:
        print(total)
    else:
        print('error')

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

total = A+B

if A >= 1 and B <= :
    if total < 10:
        print(total)
    else:
        print('error')

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

total = A+B

if A >= 1 and B <=9 :
    if total < 10:
        print(total)
    else:
        print('error')

Buggy python submission (verdict: Runtime Error):
文字列を取り込む。
文字数を数える。
文字列をソートする。
最初の文字と二番目の文字が同じかどうか確認する。
同じならば'NO'を出力する。
違うならば二番目の文字列と三番目の文字列が同じかどうか確認する。
同じならば'NO'を出力する。
・
・
・
最後から一つ前の文字と最後の文字を確認して違うならば
'YES'を出力する。

Fixed submission:
a,b = map(int, input().split())
if (a+b>=10):
	print("error")
else:
	print(a+b)
Buggy python submission (verdict: Runtime Error):
import math
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(int(math.fabs(b-a-w)))
elif b+w < a:
    print(int(math.fabs(b+w-a)))
else:
    print(int(0))
                


Fixed submission:
a, b = [(i) for i in input().split()]
if a == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if b == 'H':
        print('D')
    else:
        print('H')
Buggy python submission (verdict: Runtime Error):
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(fabs(b-a-w))
elif b+w < a:
    print(fabs(b+w-a))
else:
    print(0)

Fixed submission:
import math
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(int(math.fabs(b-a-w)))
elif b+w < a:
    print(int(math.fabs(b+w-a)))
else:
    print(int(0))

Buggy python submission (verdict: Runtime Error):
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(fabs(b-a-w))
elif b+w < a:
    print(fabs(b-a-w))
else:
    print(0)

Fixed submission:
import math
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(int(math.fabs(b-a-w)))
elif b+w < a:
    print(int(math.fabs(b+w-a)))
else:
    print(int(0))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
. 
if a<=c and b>=c:
    print("Yes")
else:
    print("No")


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

if a<=c and b>=c:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
2. 
3.if a<=c and b>=c:
4.    print("Yes")
5.else:
6.    print("No")


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

if a<=c and b>=c:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())

if a<=c and b>=c:
    print("Yes")
else;
    print("No")

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

if a<=c and b>=c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

alllist=[]
for i in range(b):
    tmp=list(map(int,input().split())
    alllist.append(tmp)

for chk in range(a):
    print(list.alllist(chk+1))

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

alllist=[]

for i in range(b):
    tmp=list(map(int,input().split()))
    alllist.extend(tmp)

for chk in range(a):
    print(alllist.count(chk+1))
Buggy python submission (verdict: Runtime Error):

a,b=map(int,input().split())
alllist=[]
goukei=0
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)

alllist2=sorted(alllist)
for i in range(a):
    goukei=alllist2[i][1]+goukei
    if goukei>b:
        owari=alllist2[i][0]
        break
    else:
        pass

print(owari)

Fixed submission:
a,b=map(int,input().split())
alllist=[]
goukei=1
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)

alllist2=sorted(alllist)
for i in range(a):
    goukei=alllist2[i][1]+goukei
    if goukei>b:
        owari=alllist2[i][0]
        break
    else:
        pass

print(owari)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
alllist=[]
goukei=0
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)
    
sorted(alllist)
for i in range(a):
    goukei=alllist[a][1]+goukei
    if goukei>b:
        owari=alllist[a][0]
        break
    else:
        pass

print(owari)

Fixed submission:
a,b=map(int,input().split())
alllist=[]
goukei=1
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)

alllist2=sorted(alllist)
for i in range(a):
    goukei=alllist2[i][1]+goukei
    if goukei>b:
        owari=alllist2[i][0]
        break
    else:
        pass

print(owari)

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

goukei=0
for i in range(a):
    aN,bN=map(int,input().split())
    goukei=bN+goukei
    if goukei>b:
        owari=aN
        break
    else:
        pass

print(owari)

Fixed submission:
a,b=map(int,input().split())
alllist=[]
goukei=1
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)

alllist2=sorted(alllist)
for i in range(a):
    goukei=alllist2[i][1]+goukei
    if goukei>b:
        owari=alllist2[i][0]
        break
    else:
        pass

print(owari)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
d=0

for n=range(1,b+1):
    if n*a%b==c:
        d=d+1
    else:
        d=d:
if d>0:
    print("YES")
else:
    print("NO")


Fixed submission:
a,b,c = map(str,input().split())
 
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c = map(str,input().split())

if a[-1]=b[0] and b[-1]=c[0]:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c = map(str,input().split())
 
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
d=0
 
for n in range(1,b+1):
    if n*a%b==c:
        d=d+1
    else:
        d=d
if d>0:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=map(int,input().split())
d=0
 
for n in range(1,b+1):
    if n*a%b==c:
        d=d+1
    else:
        d=d
if d>0:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
d=0
 
for n in range(1,b+1):
    if n*a%b==c:
        d=d+1
    else:
        d=d:
if d>0:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=map(int,input().split())
d=0
 
for n in range(1,b+1):
    if n*a%b==c:
        d=d+1
    else:
        d=d
if d>0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())

if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    print(EQUAL)

Fixed submission:
a=int(input())
b=int(input())
 
if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    print("EQUAL")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

if abs(a-b)<2:
    print("Brown")
elif:
    print("Alice")

Fixed submission:
a,b=map(int,input().split())
 
if abs(a-b)<2:
    print("Brown")
else:
    print("Alice")