Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import time
N=int(input())
lis=list(map(int, input().split()))
kind=set(lis)
kindn=len(kind)
#start_time=time.clock()
out=0
for i in kind:
    if lis.count(i)%2==0:
        out+=1
#stop_time=time.clock()
if out%2==0:
    print(kindn)
else:
    print(kindn-1)
#print(stop_time-start_time)

Fixed submission:
#coding: UTF-8
import time
import collections
N=int(input())
lis=list(map(int, input().split()))
#kind=set(lis)
#kindn=len(kind)
kind_dict=collections.Counter(lis)
kindn=len(kind_dict)
out=0
for i in kind_dict:
    if kind_dict[i]%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
import time
N=int(input())
lis=list(map(int, input().split()))
kind=list(set(lis))
kindn=len(kind)
out=0
for i in kind:
    if lis.count(i)%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

Fixed submission:
#coding: UTF-8
import time
import collections
N=int(input())
lis=list(map(int, input().split()))
#kind=set(lis)
#kindn=len(kind)
kind_dict=collections.Counter(lis)
kindn=len(kind_dict)
out=0
for i in kind_dict:
    if kind_dict[i]%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
N=int(input())
lis=list(map(int, input().split()))
kind=list(set(lis))
kindn=len(kind)
out=0
for i in kind:
    if lis.count(i)%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

Fixed submission:
#coding: UTF-8
import time
import collections
N=int(input())
lis=list(map(int, input().split()))
#kind=set(lis)
#kindn=len(kind)
kind_dict=collections.Counter(lis)
kindn=len(kind_dict)
out=0
for i in kind_dict:
    if kind_dict[i]%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
N, A, B=map(int, input().split())
lis=list(map(int,input().split()))
#print(lis)
out=0
for i in range(0,N-1):
    d=lis[i+1]-lis[i]
    if d*A < (B-A):
        out=out+d*A
    else:
        out=out+B
print(out)

Fixed submission:
#coding: UTF-8
A, B, C, D = map(int, input().split())
a1 = A*B
a2 = C*D
if a1 >= a2:
    print(a1)
else:
    print(a2)

Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
A, B, C, D = map(int, input().split())
a1 = A*B
a2 = C*D
if a1 >= a2:
    print(a1)
else:
    print(a2)

Fixed submission:
#coding: UTF-8
A, B, C, D = map(int, input().split())
a1 = A*B
a2 = C*D
if a1 >= a2:
    print(a1)
else:
    print(a2)
Buggy python submission (verdict: Runtime Error):
coding: UTF-8
N, A, B=map(int, input().split())
lis=list(map(int,input().split()))
#print(lis)
out=0
for i in range(0,N-1):
    d=lis[i+1]-lis[i]
    if d*A < B:
        out=out+d*A
    else:
        out=out+B
print(out)

Fixed submission:
#coding: UTF-8
N, A, B=map(int, input().split())
lis=list(map(int,input().split()))
#print(lis)
out=0
for i in range(0,N-1):
    d=(lis[i+1]-lis[i])*A
    if d < B:
        out=out+d
    else:
        out=out+B
print(out)
Buggy python submission (verdict: Time Limit Exceeded):
string = input()

while "ST" in string:
    string = string.replace("ST","")

print(len(string))


Fixed submission:
string = input()
stack = ""

for i in string:
    if i == "S":
        stack += i
    elif i == "T" and (stack == "" or stack[-1] == "T"):
        stack += i
    else:
        stack = stack[0:-1]

print(len(stack))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
i = 1
power = 1
while i <= N:
    power = power * i
    i += 1
print(power%(10**9+7))

Fixed submission:
import math
N = int(input())
power = math.factorial(N)
print(power%(10**9+7))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
a = 0
sum_a = 0

for i in range(N):
  if S[i]=="I":
    sum_a += 1 
    a = max (a , sum_a)
  else:
    sum_a- = 1
print(a)

Fixed submission:
N = int(input())
S = input()
a = 0
sum_a = 0

for i in range(N):
  if S[i]=="I":
    sum_a += 1 
    a = max (a , sum_a)
  else:
    sum_a -= 1
print(a)
Buggy python submission (verdict: Runtime Error):
number = input()
answer = 0

for i in range(number):
  number = number+1
  answer = answer + number
  
print(answer)


Fixed submission:
number = int(input())
answer = 0

for i in range(number+1):
  answer = answer + i
print(answer)

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

for i in range(number):
  number = number+1
  answer = answer + number
  
print(answer)


Fixed submission:
number = int(input())
answer = 0

for i in range(number+1):
  answer = answer + i
print(answer)

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

for i in range(number):
  number = number+1

print(number)

Fixed submission:
number = int(input())
answer = 0

for i in range(number+1):
  answer = answer + i
print(answer)
Buggy python submission (verdict: Runtime Error):
a=input()
for i in range(0,len(a)-1):
	if a[i]==a[i+1]:
		print(i+1,i+2)
		exit()
	elif i<len(a)-1:
		if a[i]==a[i+2]:
			print(i+1,i+3)
			exit()
print(-1,-1)

Fixed submission:
a=input()
for i in range(0,len(a)-1):
	if a[i]==a[i+1]:
		print(i+1,i+2)
		exit()
	elif i<len(a)-2:
		if a[i]==a[i+2]:
			print(i+1,i+3)
			exit()
print(-1,-1)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

import sys

for scc in range(M//2, -1, -1):
    excess_c = M - scc*2
    if excess_c//2 + N >= scc:
        print(scc)
        sys.exit(0)

print(0)

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

if N < M//2:
    scc_min = max(1, N)
else:
    scc_min = M//2
scc_max = N + M//2

while scc_min < scc_max:
    scc = (scc_min + scc_max) // 2
    excess_c = M - scc*2
    if scc_min + 1 == scc_max:
        break
    if excess_c > 0 and excess_c//2 + N >= scc:
        scc_min = scc
    else:
        scc_max = scc - 1

excess_c = M - scc_max*2
if excess_c > 0 and excess_c//2 + N >= scc_max:
    print(scc_max)
else:
    print(scc_min)

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

for scc in range(M//2, -1, -1):
    excess_c = M - scc*2
    if excess_c//2 + N >= scc:
        print(scc)
        sys.exit(0)

print(0)

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

if N < M//2:
    scc_min = max(1, N)
else:
    scc_min = M//2
scc_max = N + M//2

while scc_min < scc_max:
    scc = (scc_min + scc_max) // 2
    excess_c = M - scc*2
    if scc_min + 1 == scc_max:
        break
    if excess_c > 0 and excess_c//2 + N >= scc:
        scc_min = scc
    else:
        scc_max = scc - 1

excess_c = M - scc_max*2
if excess_c > 0 and excess_c//2 + N >= scc_max:
    print(scc_max)
else:
    print(scc_min)
Buggy python submission (verdict: Runtime Error):
    n, l = (int(s) for s in input().strip().split(' '))
    an = []
for a in range(0,l):
    an.append(input().strip().split())

box=[[1,0] for i in range(n)]
box[0][1] = 1
for move in an:
    box[int(move[0])-1][0] -= 1
    box[int(move[1])-1][0]+=1
    if box[int(move[0])-1][1] == 1:
        box[int(move[1])-1][1]= 1
    if box[int(move[0])-1][0]==0:
        box[int(move[0])-1][1]=0
print(str(sum([s[1] for s in box])))

Fixed submission:
n, l = (int(s) for s in input().strip().split(' '))
an = []
for a in range(0,l):
    an.append(input().strip().split())
box=[[1,0] for i in range(n)]
box[0][1] = 1
for move in an:
    box[int(move[0])-1][0] -= 1
    box[int(move[1])-1][0]+=1
    if box[int(move[0])-1][1] == 1:
        box[int(move[1])-1][1]= 1
    if box[int(move[0])-1][0]==0:
        box[int(move[0])-1][1]=0
print(str(sum([s[1] for s in box])))
Buggy python submission (verdict: Runtime Error):
#import ascii
#def ctoi(ch):
#	return ch - 97

def itoc(i):
	return chr(i+97)
s = raw_input()
s = map(lambda x: ord(x) - 97, s)
K = input()
N = len(s)
#print("s", s)
for i in range(N):
	if s[i] + K <= 25:
		pass
	elif s[i] != 0:
		K = K - (25 - s[i]) - 1
		s[i] = 0
	else:
		pass
	if K == 0:
		break
#print(s)
#print(K)

for i in range(N-1, -1, -1):
	if s[i] + K <= 25:
		s[i] = s[i] + K
		K = 0
		break
	else:
		K = K - (26 - s[i])
		s[i] = 0
#print(K)
tmp = [itoc(item) for item in s]
print("".join(tmp))



Fixed submission:
l = raw_input()
print(l[:4]+" "+l[4:])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

factorial = 1
divisor = []
ans = 0

for i in range(1,n+1):
    factorial = factorial * i

for i in range(1,factorial+1):
    if factorial % i == 0:
        divisor.append(i)

# print(divisor)

ans = len(divisor) % (10 ** 9 + 7)

print(ans)

Fixed submission:
import math
import collections

n = int(input())

factorial = 1
divisor = []
ans = 1


# 素数を求める関数
def get_prime(num):
    if num <= 1:
        return
    for i in range(2, num+1):
        while num % i == 0:
            divisor.append(i)
            num //= i


# 約数の数 = (素数xの個数+1)(素数yの個数+1)(素数zの個数+1)...
# 方針：入力値を素因数分解し、各素因数の個数を求める

# n-iの素因数を求める
for j in range(2, n+1):
    get_prime(j)

# print(divisor)

# 各素因数の組み合わせ数を求める
count = collections.Counter(divisor)

for k in count.most_common():
    temp = list(k)[1]
    ans = ans * (temp + 1)

ans = ans % (10 ** 9 + 7)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int,input().split())
# print(k)
# print(s)

# 組み合わせをカウントする変数
count = 0

# 変数の初期化
x = 0
y = 0
z = 0

for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x + y + z == s:
                count += 1

print(count)


Fixed submission:
k, s = map(int,input().split())
# print(k)
# print(s)

# 組み合わせをカウントする変数
count = 0

# 変数の初期化
x = 0
y = 0
z = 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):
l=[]
x=0
l.append(x)
n=int(input())
s=input()
for i in s:
  if(i=='I'):
      x++
      l.append(x)
  if(i=='D'):
      x--
      l.append(x)
print(max(l))

Fixed submission:
l=[]
x=0
l.append(x)
n=int(input())
s=input()
for i in s:
  if(i=='I'):
      x=x+1
      l.append(x)
  if(i=='D'):
      x=x-1
      l.append(x)
print(max(l))

Buggy python submission (verdict: Runtime Error):
l=[]
x=0
l.append(x)
n=int(input())
s=input()
for i in s:
  if(i=='I'):
    x++
    l.append(x)
  if(i=='D'):
    x--
    l.append(x)
print(max(l))

Fixed submission:
l=[]
x=0
l.append(x)
n=int(input())
s=input()
for i in s:
  if(i=='I'):
      x=x+1
      l.append(x)
  if(i=='D'):
      x=x-1
      l.append(x)
print(max(l))
Buggy python submission (verdict: Runtime Error):
import math 

n=int(input())
l={}
  
# A function to print all prime factors of  
# a given number n 
def primeFactors(n): 
      
    # Print the number of two's that divide n 
    while n % 2 == 0: 
        if('2' in l):
            l['2']+=1
        else:
            l['2']=1
        n = n / 2
          
    # n must be odd at this point 
    # so a skip of 2 ( i = i + 2) can be used 
    for i in range(3,int(math.sqrt(n))+1,2): 
          
        # while i divides n , print i ad divide n 
        while n % i== 0:
            if(i in l):
                l[i]+=1
            else:
                l[i]=1
            n = n / i 
              
    # Condition if n is a prime 
    # number greater than 2 
    if n > 2: 
        if(n in l):
            l[n]+=1
        else:
            l[n]=1
        
primeFactors(math.factorial(n))
#print(l)
k=1
for i in l:
    k=k*(l[i]+1)
print(k)
    


Fixed submission:
import math
n=int(input())
prime=[]


def expFactor(n, p): 
    x = p 
    exponent = 0
    while n // x > 0: 
      
        exponent += n // x 
        x *= p 
    return exponent 

ans=1

if(n>=2):
    prime.append(2)
for i in range(3,n+1):
    countt=0
    for j in range (1,int(math.sqrt(i))+1):
        if(i%j==0):
            countt+=1
    if(countt==1):
        prime.append(i)
#print(prime)
for i in prime:
    ans*=(expFactor(n,i)+1)
print(ans%(1000000007))
Buggy python submission (verdict: Runtime Error):
n=int(input())
numbb=input().split(' ')
numb=[]
for i in numbb:
    numb.append(int(i))
numb=sorted(numb)
#print(numb)
if(n==len(numb)):
    if(n%2!=0):
        temp=[]
        temp.append(0)
        strt=2
        for i in range(0,int(n/2)):
            temp.append(strt)
            temp.append(strt)
            strt+=2
        if(temp==numb):
            #print(temp,numb)
            print(pow(2,len(set(numb))-1)%((10**9)+7))
        else:
            print(0)
    if(n%2==0):
        temp=[]
        strt=1
        for i in range(0,int(n/2)):
            temp.append(strt)
            temp.append(strt)
            strt+=2
        if(temp==numb):
            #print(temp,numb)
            #print(pow(2,len(set(numb))))
            print((pow(2,len(set(numb)))%((10**9)+7)))
        else:
            print(0)
    

Fixed submission:
st=input()
print(eval(st))

Buggy python submission (verdict: Runtime Error):
n=int(input())
numbb=input().split(' ')
numb=[]
for i in numbb:
    numb.append(int(i))
numb=sorted(numb)
#print(numb)
if(n==len(numb)):
    if(n%2!=0):
        temp=[]
        temp.append(0)
        strt=2
        for i in range(0,int(n/2)):
            temp.append(strt)
            temp.append(strt)
            strt+=2
        if(temp==numb):
            #print(temp,numb)
            print(((pow(2,len(set(numb))-1)%((10**9)+7))))
        else:
            print(0)
    if(n%2==0):
        temp=[]
        strt=1
        for i in range(0,int(n/2)):
            temp.append(strt)
            temp.append(strt)
            strt+=2
        if(temp==numb):
            #print(temp,numb)
            #print(pow(2,len(set(numb))))
            print(((pow(2,len(set(numb)))%((10**9)+7))))
        else:
            print(0)
    

Fixed submission:
st=input()
print(eval(st))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = [13,1,2,3,4,5,6,7,8,9,10,11,12]

if c[a] > c[b]:
    print('Alice')
elif c[a] < c[b]:
    print('Bob')
else:
    print('Draw')

Fixed submission:
a, b = map(int, input().split())
c = [13,1,2,3,4,5,6,7,8,9,10,11,12]

if c[a-1] > c[b-1]:
    print('Alice')
elif c[a-1] < c[b-1]:
    print('Bob')
else:
    print('Draw')
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = input().split()

for i in range(10*n - n):
    c = str(n+i)
    
    for j in a:
        if j in c:
            break
    
    else:
        ans = c
        break
        
print(ans)

Fixed submission:
ans = [5,5,7]
a = sorted(list(map(int, input().split())))
if a == ans:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = input().split()

for i in range(10*n - n):
    c = str(n+i)
    
    for j in a:
        if j in c:
            break
    
    else:
        ans = c
        break
        
print(ans)

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

for i in range(10*n - n):
    c = str(n+i)
    
    for j in a:
        if j in c:
            break
    
    else:
        ans = c
        break
        
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = input().split()
a = input().split()

n = int(n)

for i in range(10000-n):
    c = str(n+i)
    
    for j in a:
        if j in c:
            break
    
    else:
        ans = c
        break
        
print(ans)

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

for i in range(10*n - n):
    c = str(n+i)
    
    for j in a:
        if j in c:
            break
    
    else:
        ans = c
        break
        
print(ans)
Buggy python submission (verdict: Runtime Error):
num_list = input().split(" ")

num_list = map(num_list, int)

sorted_list = num_list.sorted()
 
if sorted_list == [5, 5, 7]:
  print("YES")
else:
  print("NO")

Fixed submission:
haiku = input().split()

haiku = sorted(list(map(int, haiku)))

if [5, 5, 7] == haiku:
    print('YES')
else:
    print('NO')

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

sorted_list = num_list.sorted()

if sorted_list == [5, 5, 7]:
  print("YES")
else:
  print("NO")

Fixed submission:
haiku = input().split()

haiku = sorted(list(map(int, haiku)))

if [5, 5, 7] == haiku:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
x = 0
c = 0
for i in range(n):
    if s[i] = "I":
        c += 1
    else:
        c -= 1
    x = max(x,c)
print(x)

Fixed submission:
n = int(input())
s = input()
x = 0
c = 0
for i in range(n):
    if s[i] == "I":
        c += 1
    else:
        c -= 1
    x = max(x,c)
print(x)
Buggy python submission (verdict: Runtime Error):
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
a = iter[dx, dy, dx, dy+1, dx+1, dy+1, dx+1, dy+1,]
w = "R"*next(a) + "U"*next(a) + "L"*next(a) + "D"*next(a) + "R"*next(a) + "U"*next(a) + "L" + "U" + "L"*next(a) + "D"*next(a) + "R"
print(w)

Fixed submission:
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
a = iter([dx, dy, dx, dy+1, dx+1, dy+1, dx+1, dy+1,])
w = "R"*next(a) + "U"*next(a) + "L"*next(a) + "D"*next(a) + "R"*next(a) + "U"*next(a) + "L" + "U" + "L"*next(a) + "D"*next(a) + "R"
print(w)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = sorted(list(map(int, input().split())))
if n % 2 == 0:
  if a == sorted(2*[2*x+1 for x in range(n/2)]):
    print(2**(n/2))
  else:
    print(0)
else:
  if a == sorted(list(2*[2*x for x in range(n//2+1)])[1:]):
    print(2**(n//2))
  else:
    print(0)

Fixed submission:
n = int(input())
a = sorted(list(map(int, input().split())))
if n % 2 == 0:
  if a == sorted(2*[2*x+1 for x in range(int(n/2))]):
    print((2**int(n/2))%1000000007)
  else:
    print(0)
else:
  if a == sorted(list(2*[2*x for x in range(n//2+1)])[1:]):
    print((2**(n//2))%1000000007)
  else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
import sys
import itertools

def main():
    k,s = map(int,sys.stdin.read().split())
    ans = []
    for x in xrange(k+1):
        for y in xrange(k+1):
            if x + y <= s:
                z = s - (x + y)
                if(z>=0 and z <= k):
                    ans.append([x,y,z])
            else:
                break
    sys.stdout.write("%d" % len(ans))

if __name__ == '__main__':
    main()  


Fixed submission:
# coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
import sys
import itertools

def main():
    k,s = map(int,sys.stdin.read().split())
    ans = []
    count = 0
    for x in xrange(k+1):
        for y in xrange(k+1):
            if x + y <= s:
                z = s - (x + y)
                if(z>=0 and z <= k):
                    count += 1
                    # ans.append([x,y,z])
            else:
                break
    # sys.stdout.write("%d" % len(ans))
    sys.stdout.write("%d" % count)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
import os
import sys
import math
import itertools

def main():
    k,s = map(int,sys.stdin.read().split())
    ans = []
    for i in itertools.product(xrange(k+1), repeat=2):
        x, y = i
        z = s - sum(i)
        if(z >= 0 and z<=k and sum([x,y,z])==s):
            ans.append((x,y,z))
    sys.stdout.write("%d" % len(ans))

if __name__ == '__main__':
    main()


Fixed submission:
# coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
import sys
import itertools

def main():
    k,s = map(int,sys.stdin.read().split())
    ans = []
    count = 0
    for x in xrange(k+1):
        for y in xrange(k+1):
            if x + y <= s:
                z = s - (x + y)
                if(z>=0 and z <= k):
                    count += 1
                    # ans.append([x,y,z])
            else:
                break
    # sys.stdout.write("%d" % len(ans))
    sys.stdout.write("%d" % count)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
candy = int(input())
x = candy.split()
i = 0
for v in x
    if max(x) == v and (i+1)%3 + (i+2)%3 = v:
            print('YES')
            break
    i ++
if i >= 2
    print('NO')

Fixed submission:
candy = input()
x = candy.split()
y = [0,0,0]
for i in range(3):
    y[i] = int(x[i])
i = 0
for v in y:
    if max(y) == v and y[(i+1)%3] + y[(i+2)%3] == v:
            print('Yes')
            break
    i = i+1
if i >= 3:
    print('No')
Buggy python submission (verdict: Runtime Error):
haiku = int(input())
x = haiku.split(' ')
num_5 = 0
num_7 = 0

for v in x:
	if x[v] == 5:
		num_5 ++
	elif x[v] == 7:
		num_7 ++

if num_5 == 2 and num_7 == 1:
	print('YES')
else:
	print('NO')

Fixed submission:
haiku = input()
x = haiku.split()
num_5 = 0
num_7 = 0

for v in x:
    v = int(v)
    if v == 5:
        num_5 += 1
    elif v == 7:
        num_7 += 1

if num_5 == 2 and num_7 == 1:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
haiku = int(input())
x = haiku.split(' ')
num_5 = 0
num_7 = 0

for v in x:
	if x[v] == 5:
		num_5 ++
	elif x[v] == 7:
		num_7 ++

if num_5 == 2 and num_7 == 1
	print('YES')
else
	print('NO')

Fixed submission:
haiku = input()
x = haiku.split()
num_5 = 0
num_7 = 0

for v in x:
    v = int(v)
    if v == 5:
        num_5 += 1
    elif v == 7:
        num_7 += 1

if num_5 == 2 and num_7 == 1:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())
 
ans = (abs(x) + abs(y)) * 2
 
if x < y:
    ans = min(ans, y - x)
 
if -x <= y:
    ans = min(ans, y - (-x) + 1)
 
if x <= -y:
    ans = min(ans, (-y) - x + 1)
 
if -x < -y:
    ans = min(ans, (-y) - (-x) + 2)
 
print(ans)

Fixed submission:
x, y = map(int, input().split())
 
ans = (abs(x) + abs(y)) * 2
 
if x < y:
    ans = min(ans, y - x)
 
if -x <= y:
    ans = min(ans, y - (-x) + 1)
 
if x <= -y:
    ans = min(ans, (-y) - x + 1)
 
if -x < -y:
    ans = min(ans, (-y) - (-x) + 2)
 
print(ans)