Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())

score = len(str(N))

i = 2
while i ** 2 < N:
    a, b = divmod(N, i)
    if b == 0:
        score = len(str(a))
	i += 1
print(score)


Fixed submission:
N = int(input())

score = len(str(N))

i = 2
while i ** 2 <= N:
    a, b = divmod(N, i)
    if b == 0:
        score = min(score, len(str(a)))
    i += 1
print(score)

Buggy python submission (verdict: Runtime Error):
N = int(input())

score = len(str(N))

i = 2
while i ** 2 < N:
    a, b = divmod(N, i)
    if b == 0:
        score = len(str(a))
	"""
        if score == len(str(i)):
            break
        i = max(N // (10 ** (score - 1)), i+1)
    """
	i += 1
print(score)


Fixed submission:
N = int(input())

score = len(str(N))

i = 2
while i ** 2 <= N:
    a, b = divmod(N, i)
    if b == 0:
        score = min(score, len(str(a)))
    i += 1
print(score)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
n = max(int(b / a), 1)
p = 'NO'
s = set()
r = n * a % b

while r not in s:
    if r == c:
        p = 'YES'
        break
    else:
        s.append(r)
        n += 1
        r = n * a % b
print(p)


Fixed submission:
a, b, c = map(int, input().split())
n = max(int(b / a), 1)
p = 'NO'
s = set()
r = n * a % b

while r not in s:
    if r == c:
        p = 'YES'
        break
    else:
        s.add(r)
        n += 1
        r = n * a % b
print(p)
Buggy python submission (verdict: Runtime Error):
O = list(input())
E = list(input())
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)


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

Buggy python submission (verdict: Runtime Error):
O = list(input())
E = list(input())
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)


Fixed submission:
a, b, c = map(int, input().split())
if b - a == c - b:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
O = input()
E = input()
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)

Fixed submission:
O = list(input())
E = list(input())
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)

Buggy python submission (verdict: Runtime Error):
O = input()
E = input()
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)

Fixed submission:
O = list(input())
E = list(input())
s = ''
while O or E:
    if len(E) >= len(O):
        s = E.pop() + s
    else:
        s = O.pop() + s
print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input()) - 1
a = list(input())
while n and a:
    n -= 1
    a = [i for i in a if i in input()]
print(a)


Fixed submission:
n = int(input())

cnt = [10000] * 26

for i in range(n):
    s = input()
    tmp = [0] * 26
    for c in s:
        tmp[ord(c) - ord('a')] += 1
    for j in range(26):
        cnt[j] = min(cnt[j], tmp[j])

a = ''
for i in range(26):
    if cnt[i]:
        a = a + chr(ord('a') + i) * cnt[i]
print(a)

Buggy python submission (verdict: Runtime Error):
n = int(input()) - 1
a = list(input())
while n and a:
    a = [i for i in a if i in input()]
print(a)


Fixed submission:
n = int(input())

cnt = [10000] * 26

for i in range(n):
    s = input()
    tmp = [0] * 26
    for c in s:
        tmp[ord(c) - ord('a')] += 1
    for j in range(26):
        cnt[j] = min(cnt[j], tmp[j])

a = ''
for i in range(26):
    if cnt[i]:
        a = a + chr(ord('a') + i) * cnt[i]
print(a)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
s = []
d = []
for i in range(n):
    x, y = map(int, input().split())
    s.append([x, y])
for i in range(m):
    x, y = map(int, input().split())
    d.append([x, y])
for i in s:
    a = m
    c = abs(i[0] - d[0][0]) + abs(i[1] - d[1][1])
    for j in range(1, m):
        c_t = abs(i[0] - d[j][0]) + abs(i[1] - d[j][1])
        if c_t < c:
            c = min(c, c_t)
            a = j
    print(a)


Fixed submission:
a, b = map(int, input().split())
if a + b >= 24:
    print(a + b - 24)
else:
    print(a + b)

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    print((A+B)%24)

Fixed submission:
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    A = times[0]
    B = times[1]
    print((A+B)%24)
Buggy python submission (verdict: Time Limit Exceeded):
import queue

if __name__ == "__main__":
    X = int(input())
    q = queue.Queue()
    qq = queue.Queue()
    q.put((0, 0))
    while True:
        x, t = q.get()
        if x == X :
            print(t)
            break
        t += 1
        q.put((x, t))
        q.put((x+t, t))
        q.put((x-t, t))

Fixed submission:
if __name__ == "__main__":
    X = int(input())
    s = 0
    i = 0
    while True:
        s += i
        if s >= X:
            print(i)
            break
        i += 1
Buggy python submission (verdict: Time Limit Exceeded):
import queue

def count(S, K):
    c = 0
    q = queue.Queue()
    q.put((S, 0))
    s = []
    while(q.empty() == False):
        x, y = q.get()
        if x < 0:
            break
        if x <= K and y <= K and S-x-y <= K and (x, y) not in s:
            s.append((x, y))
            c += 1
        q.put((x-1, y+1))
        q.put((x-1, y))
    return c

if __name__ == "__main__":
    inp = [int(i) for i in input().split()]
    K = inp[0]
    S = inp[1]
    print(count(S, K))

Fixed submission:
if __name__ == "__main__":
    inp = [int(i) for i in input().split()]
    K = inp[0]
    S = inp[1]
    c = 0
    for x in range(K+1):
        for y in range(K+1):
            z = S - x - y
            if z >= 0 and z <= K:
                c += 1
    print(c)

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

def count(S, K):
    c = 0
    q = queue.Queue()
    q.put((S, 0, 0))
    s = []
    while(q.empty() == False):
        x, y, z = q.get()
        if x < 0:
            break
        if x <= K and y <= K and z <= K and (x, y, z) not in s:
            s.append((x, y, z))
            c += 1
        q.put((x-1, y+1, z))
        q.put((x-1, y, z+1))
    return c




if __name__ == "__main__":
    inp = [int(i) for i in input().split()]
    K = inp[0]
    S = inp[1]
    print(count(S, K))

Fixed submission:
if __name__ == "__main__":
    inp = [int(i) for i in input().split()]
    K = inp[0]
    S = inp[1]
    c = 0
    for x in range(K+1):
        for y in range(K+1):
            z = S - x - y
            if z >= 0 and z <= K:
                c += 1
    print(c)
Buggy python submission (verdict: Runtime Error):
ef route(sx, sy, tx, ty):
    dx = tx - sx
    dy = ty - sy
    dx2 = dx if dx >= 0 else -dx
    dy2 = dy if dy >= 0 else -dy
    buf = ""
    for i in range(dx2):
        if dx >= 0:
            buf += "L"
        else:
            buf += "R"
    for i in range(dy2):
        if dy >= 0:
            buf += "U"
        else:
            buf += "D"
    return buf

if __name__ == "__main__":
    sx, sy, tx, ty = [int(i) for i in input().split()]
    r1 = route(sx, sy, tx, ty) + route(tx, ty, sx, sy)
    r2 = "L" + route(sx-1, sy, tx, ty+1)\
             + "DR" + route(tx+1, ty, sx, sy-1) + "U"
    print(r1 + r2)

Fixed submission:
def route_x(sx, tx):
    dx = tx - sx
    dx2 = dx if dx >= 0 else -dx
    buf = "R"*dx2 if dx >= 0 else "L"*dx2
    return buf

def route_y(sy, ty):
    dy = ty - sy
    dy2 = dy if dy >= 0 else -dy
    buf = "U"*dy2 if dy >= 0 else "D"*dy2
    return buf

def route(sx, sy, tx, ty):
    return route_x(sx, tx) + route_y(sy, ty)

def route2(sx, sy, tx, ty):
    dx = tx - sx
    dy = ty - sy
    if dx >= 0 and dy >= 0:
        buf = "L" + route_y(sy, ty+1) + route_x(sx-1, tx) + "D"
    if dx >= 0 and dy < 0:
        buf = "U" + route_x(sx, tx+1) + route_y(sy+1, ty) + "L"
    if dx < 0 and dy >= 0:
        buf = "D" + route_x(sx, tx-1) + route_y(sy-1, ty) + "R"
    if dx < 0 and dy < 0:
        buf = "R" + route_y(sy, ty-1) + route_x(sx+1, tx) + "U"
    return buf

if __name__ == "__main__":
    sx, sy, tx, ty = [int(i) for i in input().split()]
    r1 = route(sx, sy, tx, ty) + route(tx, ty, sx, sy)
    r2 = route2(sx, sy, tx, ty) + route2(tx, ty, sx, sy)
    print(r1 + r2)
Buggy python submission (verdict: Runtime Error):
def main():
    line=input()
    line=line.split(' ')
    n=line[0]
    t=line[1]
    line=input()
    line=line.split(' ')
    total=0
    for i in range(1,n):
        total+=min(t,line[i]-line[i-1])
    print(total)
    

if __name__=='__main__':
    main()

Fixed submission:
def main():
    line = input()
    line = line.split(' ')
    n = int(line[0])
    t = int(line[1])
    line = input()
    line = line.split(' ')
    total = 0
    for i in range(1, n):
        total += min(t, int(line[i]) - int(line[i - 1]))
    print(total+t)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
[n, k] = [int(x) for x in input().strip().split()]
a = [int(x) for x in input().strip().split()]

a.sort()

if sum(a) < k:
  print(n)
  sys.exit()

s = 0
for i in range(len(a)):
  s += a[i]
  if s >= k:
    break

aa = [x for x in a if x < a[i]]
bb = [x for x in a if x < k]

cc = []
for i in range(len(aa)):
  c = bb[:i] + bb[i+1:]
  t = k - bb[i]
  c.reverse()
  #print(c)
  flg = 0
  j = 0
  s = 0
  f = [0 for x in range(len(c))]
  while True:
    f[j] = 1
    #print(c)
    #print(f)
    s += c[j]
    if s >= t and s < k:
      flg = 1
      #print(c)
      #print(f)
      break
    if s >= k:
      f[j] = 0
      s -= c[j]
    j += 1
    if j == len(c):
      ii = -1
      for jj in range(len(c) - 1):
        if f[jj] == 1:
          ii = jj
      if ii == -1:
        break
      else:
        for l in range(ii, len(c)):
          f[l] = 0
      j = ii + 1
      s = sum([c[l] * f[l] for l in range(len(c))])
  if flg== 0:
    cc.append(bb[i])
#print(cc)
print(len(cc))


Fixed submission:
x = int(input().strip())

y = 0
i = 0
while y<x:
  i += 1
  y += i

print(i)
Buggy python submission (verdict: Runtime Error):
n = int(input().strip())
a = [int(x) for x in input().strip().split()]
flg = [-1 for i in range(n)]
b = []
l = [[] for i in range(n)]
for i in range(n - 1):
  b.append([int(x) - 1 for x in input().strip().split()])
for x in b:
  l[x[0]].append(x[1])
  l[x[1]].append(x[0])
 
while True:
  minimum = a[0]
  idx = []
  for i, x in enumerate(a):
    if flg[i] != -1 or x > minimum:
      continue
    if x < minimum:
      minimum = x
      idx =[i]
    else:
      idx.append(i)
  while True:
    w = []
    for i in idx:
      flg[i] = 0
      for x in l[i]:
        if flg[x] == -1 and a[x] != a[i]:
          flg[x] = 1
          w.append(x)
    idx = []
    for i in w:
      for x in l[i]:
        if flg[x] == -1:
          flg[x] = 0
          for y in l[x]:
            if flg[y] == -1 and a[x] > a[y]:
              flg[x] = -1
              break
          if flg[x] == 0:
            idx.append(x)
    if len(idx) == 0:
      break
  if -1 not in flg:
    break

sep = ''
s = ''
for i, x in enumerate(flg):
  if x == 1:
    s += sep + str(i + 1)
    sep = ' '

print(s)


Fixed submission:
input()
i = [int(x) % 2 for x in input().strip().split()]
if sum(i) % 2 == 0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
o = input.split()
e = input.split()
print("".join([for i,j in zip(o,e)]))

Fixed submission:
o = input()
e = input()
r = "".join([i + v for i, v in zip(o, e)])
if len(o) > len(e):
  print(r + o[-1])
else:
  print(r)
Buggy python submission (verdict: Runtime Error):
s = input().split()
s = s.upper()

s1 = s[0][0]
s2 = s[1][0]
s3 = c[2][0]

print(s1+s2+s3)

Fixed submission:
N = input().upper()
N = N.split()

print("{}{}{}".format(N[0][0],N[1][0],N[2][0]))
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if a==b:
  print(H)
else:
  print(D)

Fixed submission:
a,b = input().split()
if a==b:
  print("H")
else:
  print("D")
Buggy python submission (verdict: Runtime Error):
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS"


Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
a,b,c = input().split()
re = a[0].upper() + b[0].upper() + c[0].upper()
print re

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
strs = input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
input = input()
input = input.strip()
input = input.split(" ")
result = ""
for i in input:
    result += i[0].upper()
return result

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
import sys
if __name__ == "__main__":
    input = sys.stdin.readline()
    input = input.strip()
    input = input.split(" ")
    result = ""
    for i in input:
        result += i[0].upper()
    return result

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline()
input = input.strip()
input = input.split(" ")
result = ""
for i in input:
    result += i[0].upper()
return result

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline()
input = input.strip()
input = input.split(" ")
result = ""
for i in input:
    result += i[0].upper()
return result

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline()
input = input.srip()
input = input.split(" ")
result = ""
for i in input:
    result += i[0].upper
return result

Fixed submission:
strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS

Fixed submission:
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS"

Buggy python submission (verdict: Runtime Error):
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
if s1 == s2:
    print "EQUAL"
if s1 < s2:
    print "LESS

Fixed submission:
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS"

Buggy python submission (verdict: Runtime Error):
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS

Fixed submission:
s1 = int(raw_input())
s2 = int(raw_input())
if s1>s2:
    print "GREATER"
elif s1 == s2:
    print "EQUAL"
else:
    print "LESS"
Buggy python submission (verdict: Runtime Error):
A=int(raw_input())
B=int(raw_input())
if (A>B):
 print('GREATER')
elif(A==B):
 print('EQUAL')
else:
 print('LESS')

Fixed submission:
s1, s2, s3  =raw_input().split()
print((s1[0]+s2[0]+s3[0]).upper())

Buggy python submission (verdict: Runtime Error):
A=int(raw_input())
B=int(raw_input())
if (A>B):
 print('GREATER')
elif(A==B):
 print('EQUAL')
else:
 print('LESS')
#print((s1[0]+s2[0]+s3[0]).upper())


Fixed submission:
s1, s2, s3  =raw_input().split()
print((s1[0]+s2[0]+s3[0]).upper())

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

n = int(raw_input())
numlist = (raw_input()).split(' ')

sumlist = [int(numlist[0])]
count = 0

for i in range(1, n):
  sumlist.append(sumlist[i-1] + int(numlist[i]))
  while (True):
    if (sumlist[i-1] > 0 and sumlist[i] > 1):  #i-1,i番目までのsumがともに正
      numlist[i] = int(numlist[i]) - 1
      sumlist[i] -= 1
      count += 1
    elif (sumlist[i-1] < 0 and sumlist[i] < 0):  #i-1,i番目までのsumがともに負
      numlist[i] = int(numlist[i]) + 1
      sumlist[i] += 1
      count += 1
    elif (sumlist[i] == 0):  #i番目までのsum=0
      if (sumlist[i-1] > 0):
        numlist[i] = int(numlist[i]) - 1
        sumlist[i] -= 1
      if (sumlist[i-1] < 0):
        numlist[i] = int(numlist[i]) + 1
        sumlist[i] += 1
      count += 1
    else:
      break

print count


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

fullstr = raw_input()

sf = ['','','']

sf[0] = fullstr[0]
num = 1

for i in range(len(fullstr)):
  if (fullstr[i] == ' '):
    sf[num] = fullstr[i+1]
    num += 1

print '%s%s%s' % (sf[0].upper(), sf[1].upper(), sf[2].upper())

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

sA = raw_input()
sB = raw_input()

A = int(sA)
B = int(sB)

if (A > B):
  print 'GREATER'
elif (A < B):
  print 'LESS'
else:
  print 'EQUAL'

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

fullstr = raw_input()

sf = ['','','']

sf[0] = fullstr[0]
num = 1

for i in range(len(fullstr)):
  if (fullstr[i] == ' '):
    sf[num] = fullstr[i+1]
    num += 1

print '%s%s%s' % (sf[0].upper(), sf[1].upper(), sf[2].upper())
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

n = int(raw_input())
numlist = (raw_input()).split(' ')

count = 0

i = 0
while (int(numlist[i]) == 0):
 i += 1

if (int(numlist[0]) == 0):
    if (int(numlist[i]) > 0):
        numlist[0] = (-1) ** i
    else:
        numlist[0] = (-1) ** (i+1)
    count += 1

sumlist = [int(numlist[0])]

for i in range(1, n):
  sumlist.append(sumlist[i-1] + int(numlist[i]))
  while (True):
    if (sumlist[i-1] > 0 and sumlist[i] > 0):  #i-1,i番目までのsumがともに正
      numlist[i] = int(numlist[i]) - (sumlist[i] + 1)
      count += sumlist[i] + 1
      sumlist[i] = -1
    elif (sumlist[i-1] < 0 and sumlist[i] < 0):  #i-1,i番目までのsumがともに負
      numlist[i] = int(numlist[i]) + ((-1)*sumlist[i] + 1)
      count += (-1)*sumlist[i] + 1
      sumlist[i] = 1
    elif (sumlist[i] == 0):  #i番目までのsum=0
      if (sumlist[i-1] > 0):
        numlist[i] = int(numlist[i]) - 1
        sumlist[i] -= 1
      if (sumlist[i-1] < 0):
        numlist[i] = int(numlist[i]) + 1
        sumlist[i] += 1
      count += 1
    else:
      break
    #print numlist
    #print sumlist

print count


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

sA = raw_input()
sB = raw_input()

A = int(sA)
B = int(sB)

if (A > B):
  print 'GREATER'
elif (A < B):
  print 'LESS'
else:
  print 'EQUAL'

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

sA = raw_input()
sB = raw_input()

A = int(sA)
B = int(sB)

if (A > B):
  print 'GREATER'
elif (A < B):
  print 'LESS'
else:
  print 'EQUAL'
~            

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

sA = raw_input()
sB = raw_input()

A = int(sA)
B = int(sB)

if (A > B):
  print 'GREATER'
elif (A < B):
  print 'LESS'
else:
  print 'EQUAL'

Buggy python submission (verdict: Time Limit Exceeded):
a=raw_input()
b=raw_input()
if len(a)<len(b):
	print "LESS"
elif len(a)>len(b):
	print "GREATER"
else:
	p=0
	flag=True
	while flag:
		if a[p]<b[p]:
			print "LESS"
			flag=False
		elif a[p]>b[p]:
			print "GREATER"
			flag=False
		else:
			pass


Fixed submission:
a=int(raw_input())
b=int(raw_input())
if a<b:
	print "LESS"
elif a>b:
	print "GREATER"
else:
	print "EQUAL"

Buggy python submission (verdict: Time Limit Exceeded):
a=raw_input()
b=raw_input()
if len(a)<len(b):
	print "LESS"
elif len(a)>len(b):
	print "GREATER"
else:
	p=0
	while True:
		if a[p]<b[p]:
			print "LESS"
			break
		elif a[p]>b[p]:
			print "GREATER"
			break
		else:
			pass


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

if abs(x,y)<=1:
	print "Brown"
else:
	print "Alice"


Fixed submission:
x,y=map(int,raw_input().split())

if abs(x-y)<=1:
	print "Brown"
else:
	print "Alice"
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
 
if a == b:
 print("EQUEAL")
elif a > b:
 print("GREATER")
else:
 print("LESS")

Fixed submission:
print("".join([s[0].upper() for s in input().split()]))

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

if a == b:
 print("EQUEAL")
elif a > b:
 print("GREATER")
else:
 print("LESS")

Fixed submission:
print("".join([s[0].upper() for s in input().split()]))

Buggy python submission (verdict: Runtime Error):
n = int(input())
i = input()

i = i.split()
for item in range(len(i)):
    i[item] = int(i[item])

totn = 0
totp = 0

countp = 0
countn = 0

for x in range(len(i)):
    totp += i[x]
    totn += i[x]

    if x %2 == 1:
        if totn == 0:
            countn += 1
            totn = 1
        elif totn < 0:
            countn += abs(totn) + 1
            totn = 1

        if totp == 0:
            countp += 1
            totp = -1
        elif totp > 0:
            countp += abs(totp) + 1
            totp = -1

    if x %2 == 0:
        if totn == 0:
            countn += 1
            totn = -1
        elif totn > 0:
            countn += abs(totn) + 1
            totn = -1

        if totp == 0:
            countp += 1
            totp = 1
        elif totp < 0:
            countp += abs(totp) + 1
            totp = 1
count = min(countn, countp)
print(count)

Fixed submission:
a = input()
a = a.upper()
b = a.split()

s = b[0]
s = s[0]
t = b[1]
t = t[0]
r = b[2]
r = r[0]

q = s + t + r
print (q)
Buggy python submission (verdict: Runtime Error):
def c(ints):
    
    for i in range(len(ints)):
        if ints[i] != 0:
            sig = 1 if ints[i] > 0 else -1
            total = ints[i]
            mov = i + 1
            j = i
            break
        if i == len(ints) - 1:
            return i + 1
    
    for i_ in ints[j+1:]:
        tmp = total + i_
        if tmp == 0:
            mov +=1
            tmp = -sig
            
        elif sig * tmp > 0:
            mov += abs(tmp) + 1
            tmp = -sig
            
        sig *= -1
        total = tmp
        
    return mov

_ = input()
inp = input()
inp = inp.split(' ')
inp = [int(i_) for i_ in inp]
print(c(inp))

Fixed submission:
def a(inp):
    sts = inp.split(' ')
    ans = [s[0].upper() for s in sts]
    print(''.join(ans))

a(input())

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

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

Fixed submission:
def a(inp):
    sts = inp.split(' ')
    ans = [s[0].upper() for s in sts]
    print(''.join(ans))

a(input())