Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
S=V-W
time=(A-B)/S
if S <=0:
   print("NO")
elif time<=T:
   print("YES")
else:
   print("NO")

Fixed submission:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
S=V-W
d=abs(A-B)
if S <=0:
   print("NO")
elif d<=T*S:
   print("YES")
else:
   print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
i=1
sum=A[0]
while A[0]<=10**18 and i<=N-1:
   sum*=A[i]
   i+=1
if sum>10**18:
   sum=-1
print(sum)

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

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
i=1
while A[0]<=10**18 and i<=N-1:
   A[0]*=A[i]
   i+=1
if A[0]>10**18:
   A[0]=-1
print(A[0])


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

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
i=1
while A[0]<=10**18 and i<=N-1:
   A[0]*=A[i]
   i+=1
if A[0]>10**18:
   A[0]=-1
print(A[0])

import gc
gc.collect()

Fixed submission:
a,b = map(int, input().split()) 
print(a*b)
Buggy python submission (verdict: Runtime Error):
N=input()
mod=N%10
if mod=3:
  print('bon')
elif mod=0,1,6,8:
  print('pon')
else:
  print('hon')


Fixed submission:
N=int(input())
mod=N%10
if mod==3:
    print('bon')
elif mod== 0 or mod== 1 or mod== 6 or mod== 8:
    print("pon")
else:
    print('hon')
Buggy python submission (verdict: Runtime Error):
S, T = input().split()
print(T+S)

Fixed submission:
A, B, K = map(int, input().split())
if K <= A:
    print(A-K, B)
elif K <= A+B:
    print(0, B-(K-A))
else:
    print(0, 0)
Buggy python submission (verdict: Time Limit Exceeded):
A, B = input().split()
A = int(A)
B = int(B)
ans = A
for i in range(A + 1, B + 1):
    ans ^= i
print(ans)

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


def f(n):
    if n % 4 == 0:
        return n
    elif n % 4 == 1:
        return 1
    elif n % 4 == 2:
        return n ^ (n-1) ^ (n-2)
    elif n % 4 == 3:
        return 0

print(f(A-1) ^ f(B))
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
A = list(map(int, input().split()))
ans = A[0]
for i in range(1, N):
    ans = math.gcd(ans, A[i])

print(ans)


Fixed submission:
import fractions
N = int(input())
A = list(map(int, input().split()))
ans = A[0]
for i in range(1, N):
    ans = fractions.gcd(ans, A[i])

print(ans)
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]
a.sort()
b = [a[2]-a[1], a[1]-a[0], a[2]-[0]]
print(sum(b)-max(b))

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

m = min(abs(a - b) + abs(b - c), abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))
print(m)
Buggy python submission (verdict: Runtime Error):
import math
a = input()
if a[-4] != '0':
  b = int(a[-5:])
elif a[-3] != '0':
  b = int(a[-4:])
elif a[-2] != '0':
  b = int(a[-3:])
else:
  b = int(a[-0])
c = 1000
print(c-b)

Fixed submission:
import math
a = input()
b = int(a)
c = 1000
if len(a) < 4:
  print(c-b)
else:
  if a[-4] != '0':
    b = int(a[-3:])
    if b == 0:
      print(int(0))
    else:
      print(c-b)
  elif a[-3] != '0':
    b = int(a[-2:])
    print(c-b)
  elif a[-2] != '0':
    b = int(a[-1:])
    print(c-b)
  else:
    print(int(0))
Buggy python submission (verdict: Runtime Error):
a = int(input())
if (a[-1] == 2,4,5,7,9):
  print("hon")
if (a[-1] == 0,1,6,8):
  print("pon")
if (a[-1] == 3):
  print("bon")

Fixed submission:
N = str(input())
b = int(N[-1])
if (b==2 or b==4 or b==5 or b==7 or b==9):
  print("hon")
elif (b==0 or b==1 or b==6 or b==8):
  print("pon")
elif (b==3):
  print("bon")
else:
  print("Error")
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
  a = input()
  l.append(a)
print(f"{'AC'} x {l.count('AC')"}
print(f"{'WA'} x {l.count('WA')"}
print(f"{'TLE'} x {l.count('TLE')"}
print(f"{'RE'} x {l.count('RE')"}

Fixed submission:
n = int(input())
l = []
for i in range(n):
  a = input()
  l.append(a)
print(f"{'AC'} x {l.count('AC')}")
print(f"{'WA'} x {l.count('WA')}")
print(f"{'TLE'} x {l.count('TLE')}")
print(f"{'RE'} x {l.count('RE')}")

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
  a = input()
  l.append(a)
print(f"{'AC'} x {l.count('AC')}
print(f"{'WA'} x {l.count('WA')}
print(f"{'TLE'} x {l.count('TLE')}
print(f"{'RE'} x {l.count('RE')}
      
  

Fixed submission:
n = int(input())
l = []
for i in range(n):
  a = input()
  l.append(a)
print(f"{'AC'} x {l.count('AC')}")
print(f"{'WA'} x {l.count('WA')}")
print(f"{'TLE'} x {l.count('TLE')}")
print(f"{'RE'} x {l.count('RE')}")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]

status = ["AC","WA","TLE","RE"]
ans  = [0]*n

for i in range(len(status)):
    ans[i] = len([j for j in s if status[i] in s])

print("AC x {}".format(ans[0]))
print("WA x {}".format(ans[1]))
print("TLE x {}".format(ans[2]))
print("RE x {}".format(ans[3]))


Fixed submission:
n = int(input())

change = 1000 - n % 1000
if n % 1000 == 0:
    change = 0
print(change)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]

status = ["AC","WA","TLE","RE"]

for i in range(len(status)):
    status[i] = len([j for j in s if status[i] in s])

print("AC x {}".format(status[0]))
print("WA x {}".format(status[1]))
print("TLE x {}".format(status[2]))
print("RE x {}".format(status[3]))

Fixed submission:
n = int(input())

change = 1000 - n % 1000
if n % 1000 == 0:
    change = 0
print(change)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 1]
    temp = num

print(point)



Fixed submission:
n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 2]
    temp = num

print(point)

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

point = 0
count = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[count]
        count += 1
    temp = num

print(point)



Fixed submission:
n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 2]
    temp = num

print(point)

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

point = 0

for i, num in enumerate(a):
    point += b[num - 1]
    if i == (len(a) - 1):
        point += c[num - 1]

print(point)



Fixed submission:
n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 2]
    temp = num

print(point)
Buggy python submission (verdict: Runtime Error):
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

while(1):
    if unused_tap >= b:
        print(count)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1



Fixed submission:
S = input()
T = input()
days = 0

for i in range(3):
    if S == T:
        days = 3
        break
    if S[i] == T[i]:
        days += 1
    
print(days)

Buggy python submission (verdict: Runtime Error):
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

if a > b:
    print(1)
    exit()

while(1):
    if unused_tap >= b:
        print(count)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1



Fixed submission:
S = input()
T = input()
days = 0

for i in range(3):
    if S == T:
        days = 3
        break
    if S[i] == T[i]:
        days += 1
    
print(days)

Buggy python submission (verdict: Runtime Error):
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

if a > b:
    print(1)
    exit()

while(1):
    if unused_tap >= b:
        print(count + 1)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

    

Fixed submission:
S = input()
T = input()
days = 0

for i in range(3):
    if S == T:
        days = 3
        break
    if S[i] == T[i]:
        days += 1
    
print(days)
Buggy python submission (verdict: Runtime Error):
n = int(input())  # nは入力回数
str_list = [input() for _ in range(n)]


a=0
b=0
c=0                
d=0                
                
for num in range(1, n):
    if str_list[num] == 'AC':
    	a += 1
    elif str_list[num] == 'WA':
    	b += 1
    elif str_list[num] == 'TLE':
    	c +=1
    else str_list[num] == 'RE':
    	d +=1
    		continue;

print('AC x'+ a)
print('WA x'+ b)
print('TLE x'+ c)
print('RE x'+ d)


Fixed submission:
N=int(input())

x = N % 1000

Otsuri = 1000-x

if Otsuri == 1000:
  print(0)
else:
  print(Otsuri)

Buggy python submission (verdict: Runtime Error):
n = int(input())  # nは入力回数
str_list = [input() for _ in range(n)]


a=0
b=0
c=0                
d=0                
                
for num in range(1, n)
    if str_list[num] == 'AC':
    	a += 1
    elif str_list[num] == 'WA':
    	b += 1
    elif str_list[num] == 'TLE':
    	c +=1
    else str_list[num] == 'RE':
    	d +=1
    		continue;

print('AC x'+ a)
print('WA x'+ b)
print('TLE x'+ c)
print('RE x'+ d)


Fixed submission:
N=int(input())

x = N % 1000

Otsuri = 1000-x

if Otsuri == 1000:
  print(0)
else:
  print(Otsuri)

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

x %= 1000

Otsuri = 1000-x

print(Otsuri)

Fixed submission:
N=int(input())

x = N % 1000

Otsuri = 1000-x

if Otsuri == 1000:
  print(0)
else:
  print(Otsuri)
Buggy python submission (verdict: Runtime Error):
S = list(input ())
T = list(input ())
a = len(S)
change_time = 0
 
for i in range(a):
  if S[i] ==T[i]:
  	continue
  
  else:
  	S[i] =T[i]
  	change_time += 1
  
  
print(change_time)

Fixed submission:
s = int(input())
 
N=s+s*s+s*s*s
 
print (N)

Buggy python submission (verdict: Runtime Error):
S = list(input ())
T = list(input ())
a = len(S)
change_time = 0
 
for i in a:
  if S[i] ==T[i]:
  	continue
  
  else:
  	S[i] =T[i]
  	change_time += 1
  
  
print(change_time)

Fixed submission:
s = int(input())
 
N=s+s*s+s*s*s
 
print (N)

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

int a = s*s*s+s*s+s

 return

Fixed submission:
s = int(input())
 
N=s+s*s+s*s*s
 
print (N)
Buggy python submission (verdict: Runtime Error):
S = list(input ())
T = list(input ())
a = len(S)
change_time = 0

for i in a:
  if (S[i] ==T[i])
  continue
  
  else:
  S[i] =T[i]
  change_time += 1
  
  
print(change_time)

Fixed submission:
S = list(input ())
T = list(input ())
a = len(S)
change_time = 0
 
for i in range(a):
  if S[i] ==T[i]:
  	continue
  
  else:
 
  	change_time += 1
  
  
print(change_time)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
d=[a[0]]
ans=0
for i in range(1,n):
  tmp=max(d)
  ans=ans+tmp
  d.remove(tmp)
  d.append(a[i])
  d.append(a[i])
print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
ans=0
for i in range(1,n):
  ans=ans+a[i//2]
print(ans)
Buggy python submission (verdict: Runtime Error):
import random
for _ in range(365):
  print(random.randint(1:26))

Fixed submission:
import random
import numpy as np

def scoring(t,d,c,s):
  for day in range(d):
    t[day]=t[day]-1
  last=[0 for _ in range(26)]
  score=0
  for day in range(d):
    score=score+s[day][t[day]]
    score=score+c[t[day]]*(day-last[t[day]])*(d-day)
    last[t[day]]=day
  return score

d=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for _ in range(d)]
t=[0 for _ in range(d)]
last=[-1 for _ in range(26)]
for day in range(d):
  s_d=s[day]
  for i in range(26):
    s_d[i]=s_d[i]+c[i]*(day-last[i])*(d-day)
#  print(s_d)
  max_value = max(s_d)
  max_index = s_d.index(max_value)
  t[day]=max_index+1
  last[max_index]=day
for i in range(d):
  print(t[i])
#print(scoring(t,d,c,s))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
q=int(input())
bc=[map(int,input().split()) for _ in range(q)]
b,c=[list(i) for i in zip(*bc)]
a.sort
count=[0 for _ in range(100000)]
sum=0
for i in range(n):
  count[a[i]]=count[a[i]]+1
  sum=sum+a[i]
for i in range(q):
  sum=sum+(c[i]-b[i])*count[b[i]]
  print(sum)
  count[c[i]]=count[c[i]]+count[b[i]]
  count[b[i]]=0


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

bc=[map(int,input().split()) for _ in range(q)]
b,c=[list(i) for i in zip(*bc)]
a.sort
count=[0 for _ in range(1000000)]
sum=0
for i in range(n):
  count[a[i]]=count[a[i]]+1
  sum=sum+a[i]
for i in range(q):
  sum=sum+(c[i]-b[i])*count[b[i]]
  print(sum)
  count[c[i]]=count[c[i]]+count[b[i]]
  count[b[i]]=0
Buggy python submission (verdict: Time Limit Exceeded):
import math
n=int(input())
a=list(map(int,input().split()))
s=[0 for _ in range(30)]
p=[]
for j in range(30):
  p.append(pow(2,j))
for i in range(n):
  for j in range(30):
    s[j]=(s[j]+(a[i]//p[j]%2))
for i in range(n):
  ans=0
  for j in range(30):
    ans=ans+p[j]*((a[i]//p[j]+s[j])%2)
  print(ans,end=" ")


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
p=[]
for j in range(30):
  p.append(pow(2,j))
t=0
for i in range(n):
  t=t^a[i]
for i in range(n):
  ans=0
  for j in range(30):
    ans=ans+p[j]*(((a[i]^t)//p[j])%2)
  print(ans,end=" ")

Buggy python submission (verdict: Time Limit Exceeded):
import math
n=int(input())
a=list(map(int,input().split()))
s=[0 for _ in range(30)]
for i in range(n):
  for j in range(30):
    s[j]=(s[j]+((a[i]&pow(2,j))//pow(2,j)))
for i in range(n):
  ans=0
  for j in range(30):
    ans=ans+pow(2,j)*(((a[i]&pow(2,j))//pow(2,j)+s[j]+n)%2)
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
p=[]
for j in range(30):
  p.append(pow(2,j))
t=0
for i in range(n):
  t=t^a[i]
for i in range(n):
  ans=0
  for j in range(30):
    ans=ans+p[j]*(((a[i]^t)//p[j])%2)
  print(ans,end=" ")
Buggy python submission (verdict: Runtime Error):
def count_up(x,n):
  x[n]+=1
  if x[n]>m:
    count_up(x,n-1)
    x[n]=x[n-1]
  return
n,m,q=map(int,input().split())
abcd=[map(int,input().split()) for _ in range(q)]
a,b,c,d=[list(i) for i in zip(*abcd)]
x=[1,1,1,1,1,1,1,1,1,1,1]
ans=0
while x[1]==1:
  temp=0
  for i in range(q):
    if x[b[i]]-x[a[i]]==c[i]:
      temp+=d[i]
  ans=max(ans,temp)
  count_up(x,n)
print(ans)


Fixed submission:
def count_up(x,n):
  x[n]+=1
  if x[n]>m:
    count_up(x,n-1)
    x[n]=x[n-1]
  return
n,m,q=map(int,input().split())
abcd=[map(int,input().split()) for _ in range(q)]
a,b,c,d=[list(i) for i in zip(*abcd)]
x=[1,1,1,1,1,1,1,1,1,1,1]
ans=0
if m==1:
  temp=0
  for i in range(q):
    if x[b[i]]-x[a[i]]==c[i]:
      temp+=d[i]
  ans=max(ans,temp)
else:
  while x[1]==1:
    temp=0
    for i in range(q):
      if x[b[i]]-x[a[i]]==c[i]:
       temp+=d[i]
    ans=max(ans,temp)
    count_up(x,n)
print(ans)
Buggy python submission (verdict: Runtime Error):
c, a, b = map(int, input(),split())
print(int(c * a / 2))


Fixed submission:
c, a, b = map(int, input().split())
print(int(c * a / 2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
a.soat(reverse=True)
A = sum([i for i in a[::2]])
B = sum([j for j in a[1::2]])
print(A - B)


Fixed submission:
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)
A = sum([i for i in a[::2]])
B = sum([j for j in a[1::2]])
print(A - B)
Buggy python submission (verdict: Time Limit Exceeded):
N, Y = map(int, input().split())
for y in range(9):
    for x in range(N + 1):
        for z in range(N + 1):
            if Y == (10000 * x) + (5000 * y) + (1000 * z) and x + y + z == N:
                print(x, y, z)
                break
        else:
            continue
        break
    else:
        if y == 8:
            print(-1, -1, -1)
        continue
    break


Fixed submission:
N, Y = map(int, input().split())
for y in range(9):
    for x in range(N + 1):
        if Y == (10000 * x) + (5000 * y) + (1000 * (N - x - y)) and N >= x + y:
                print(x, y, N - x - y)
                break
        else:
            continue
        break
    else:
        if y == 8:
            print(-1, -1, -1)
        continue
    break
Buggy python submission (verdict: Runtime Error):
li = input().split('')
print(len([a for a in li if a == '1']))


Fixed submission:
s = input()
print(len([a for a in s if a == '1']))

Buggy python submission (verdict: Runtime Error):
li = list(map(int, input.split('')))
print(len([a for a in li if a == 1]))


Fixed submission:
s = input()
print(len([a for a in s if a == '1']))

Buggy python submission (verdict: Runtime Error):
li = input.split('')
print(len([a for a in li if a == '1']))


Fixed submission:
s = input()
print(len([a for a in s if a == '1']))
Buggy python submission (verdict: Runtime Error):
from math import gcd
n = int(input())
t = [int(input()) for i in range(n)]
cm = t[0]

for i in range(1, n):
    cm = cm*t[i]//gcd(cm, t[i])
print(cm)


Fixed submission:
from fractions import gcd
n = int(input())
t = [int(input()) for i in range(n)]
cm = t[0]

for i in range(1, n):
    cm = cm*t[i]//gcd(cm, t[i])
print(cm)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [input().split() for _ in range(m)]
A = set()
B = set()

for i in range(m):
    if a[i][0] == "1":
        A.add(a[i][1])
    if a[i][1] == str(n):
        B.add(a[i][0])
    if A & B:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")


Fixed submission:
n, m = map(int, input().split())
a = [input().split() for _ in range(m)]
A = []
B = []

for i in range(m):
    if a[i][0] == "1":
        A.append(a[i][1])
    if a[i][1] == str(n):
        B.append(a[i][0])
print("POSSIBLE" if set(A) & set(B) else "IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = sorted(map(int,  v input().split()))
cnt = 0

for k in range(1, 9):
    b = list(filter(lambda x: x < 400*k, a))
    if b:
        cnt += 1
    a = a[len(b):]
if cnt:
    print(cnt, cnt+len(a))
else:
    print(1, len(a))


Fixed submission:
n = int(input())
a = sorted(map(int, input().split()))
cnt = 0

for k in range(1, 9):
    b = list(filter(lambda x: x < 400*k, a))
    if b:
        cnt += 1
    a = a[len(b):]
if cnt:
    print(cnt, cnt+len(a))
else:
    print(1, len(a))
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
Table = []

for i in range(n):
    Table.extend([a[i][0]]*a[i][1])

print(sorted(Table)[k-1])


Fixed submission:
from operator import itemgetter

n, k = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
a.sort(key=itemgetter(0))
m = 0

for i in range(n):
    m += a[i][1]
    if k <= m:
        print(a[i][0])
        break
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal as deci
*a, = map(int, input().split())
if deci(a[0]) == deci(a[1]):
    print("EQUAL")
else:
    print("GREATER" if deci(a[0]) > deci(a[1]) else "LESS")


Fixed submission:
a = [int(input()) for _ in range(2)]
if a[0] == a[1]:
    print("EQUAL")
else:
    print("GREATER" if a[0] > a[1] else "LESS")

Buggy python submission (verdict: Runtime Error):
*a, = map(int, input().split())
if a[0] == a[1]:
    print("EQUAL")
else:
    print("GREATER" if a[0] > a[1] else "LESS")


Fixed submission:
a = [int(input()) for _ in range(2)]
if a[0] == a[1]:
    print("EQUAL")
else:
    print("GREATER" if a[0] > a[1] else "LESS")

Buggy python submission (verdict: Runtime Error):
*a, = map(int, input().split())
if a[0] == a[1]:
    print("EQUAL")
else:
    print("GREATER" if a[0] > a[1] else "LESS")


Fixed submission:
a = [int(input()) for _ in range(2)]
if a[0] == a[1]:
    print("EQUAL")
else:
    print("GREATER" if a[0] > a[1] else "LESS")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("YES" if b-a == c-b else "NO)


Fixed submission:
a, b, c = map(int, input().split())
print("YES" if b-a == c-b else "NO")
Buggy python submission (verdict: Time Limit Exceeded):
ans = 1
for k in range(1, int(input())+1):
    ans *= k
print(ans % (10**9+7))

Fixed submission:
from math import factorial
print(factorial(int(input())) % (10**9+7))
Buggy python submission (verdict: Runtime Error):
a = input().split()
a[0], a[2] = map(int, a[::2])
if a[0] == "+":
    print(a[0]+a[2])
else:
    print(a[0]-a[2])
a = input().split()
a[0], a[2] = map(int, a[::2])
if a[1] == "+":
    print(a[0]+a[2])
else:
    print(a[0]-a[2])


Fixed submission:
a = input().split()
a[0], a[2] = map(int, a[::2])
if a[1] == "+":
    print(a[0]+a[2])
else:
    print(a[0]-a[2])
Buggy python submission (verdict: Runtime Error):
n = int(input())
*a0, = map(int, input().split())
m = int(input())
for _ in range(m):
    k, b = map(int, input().split())
    a = a0[:]
    a[k] = b
    print(sum(a))


Fixed submission:
n = int(input())
*a0, = map(int, input().split())
m = int(input())
for _ in range(m):
    k, b = map(int, input().split())
    a = a0[:]
    a[k-1] = b
    print(sum(a))