Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input())
s_list = []
for _ in range(n):
    s_list.append(input())
s_data = collections.Counter(s_list).most_common()
s_count = s_data[0][1]
s_index = 1
for s in s_data:
    if s[1] == s_count:
        s_index += 1
    else:
        break
    

for i in range(s_index):
    print(s_data[i][0])

Fixed submission:
import collections

n = int(input())
s_list = []
for _ in range(n):
    s_list.append(input())
s_data = list(collections.Counter(s_list).most_common())
s_count = int(s_data[0][1])
s_index = 0
for s in s_data:
    if int(s[1]) == s_count:
        s_index += 1
    else:
        break
output = []
for i in range(s_index):
    output.append(s_data[i][0])
output.sort()
for s in output:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s_list, s_set = [], []
max_count, max_string = 0, []
for _ in range(n):
    s_list.append(input())
s_set = list(set(s_list))
for s in s_set:
    s_count = s_list.count(s)
    if s_count == max_count:
        max_string.append(s)
    elif s_count > max_count:
        max_count = s_count
        max_string.clear()
        max_string.append(s)

max_string = sorted(list(max_string))

for s in max_string:
    print(s)

Fixed submission:
import collections

n = int(input())
s_list = []
for _ in range(n):
    s_list.append(input())
s_data = list(collections.Counter(s_list).most_common())
s_count = int(s_data[0][1])
s_index = 0
for s in s_data:
    if int(s[1]) == s_count:
        s_index += 1
    else:
        break
output = []
for i in range(s_index):
    output.append(s_data[i][0])
output.sort()
for s in output:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s_list = []
max_count, max_string = 0, []
for _ in range(n):
    s_list.append(input())

for s in s_list:
    if s_list.count(s) == max_count:
        max_string.append(s)
    elif s_list.count(s) > max_count:
        max_count = s_list.count(s)
        max_string.clear()
        max_string.append(s)

max_string = sorted(list(set(max_string)))

for s in max_string:
    print(s)

Fixed submission:
import collections

n = int(input())
s_list = []
for _ in range(n):
    s_list.append(input())
s_data = list(collections.Counter(s_list).most_common())
s_count = int(s_data[0][1])
s_index = 0
for s in s_data:
    if int(s[1]) == s_count:
        s_index += 1
    else:
        break
output = []
for i in range(s_index):
    output.append(s_data[i][0])
output.sort()
for s in output:
    print(s)
Buggy python submission (verdict: Runtime Error):
k, x = input().split(' ')
k, x = int(k), int(x)   
arr = []
     
for i in range(k): 
 arr.append(x-i)
 arr.append(x+i)
arr = list(set(arr))
arr.sort()
text = ""
for i in range(len(arr) - 1):
  text += arr[i] + " "
print(text + arr[len(arr) - 1])

Fixed submission:
k, x = input().split(' ')
k, x = int(k), int(x)   
arr = []
         
for i in range(k): 
  arr.append(x-i)
  arr.append(x+i)
arr = list(set(arr))
arr.sort()
text = ""
for i in range(len(arr) - 1):
  text += str(arr[i]) + " "
print(text + str(arr[len(arr) - 1]))
Buggy python submission (verdict: Runtime Error):
import math
from string import ascii_lowercase

a = int(input())
b = int(input())
c = int(input())

d = set((a, b, c))
print(len(d))


Fixed submission:
import math
from string import ascii_lowercase
 
line = input()
a, b, c = [int(x) for x in line.split()]
 
d = set((a, b, c))
print(len(d))
Buggy python submission (verdict: Runtime Error):
n = int(input())
b = False
i=1
while i<=9:
    j=1
    while j<=i:
        if j*i==n:
            print('Yes')
            b = True
            break
		j+=1
    if j*i>n:
        break
    i+=1
if b==False:
    print('No')


Fixed submission:
A, B = input().split(" ")
A = int(A)
B = int(B)
if A>=1 and A<=9 and B>=1 and B<=9:
    r = A*B
    print(r)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=i:
            if j*i==n:
                print('Yes')
                b = True
                break
            j+=1
        i+=1
    if b==False:
        print('No')

Fixed submission:
A, B = input().split(" ")
A = int(A)
B = int(B)
if A>=1 and A<=9 and B>=1 and B<=9:
    r = A*B
    print(r)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=9:
            if j*i==n:
                print('Yes')
                b = True
                break
            if j*i>n:
                break
            j+=1
        i+=1
    if b==False:
        print('No')

Fixed submission:
A, B = input().split(" ")
A = int(A)
B = int(B)
if A>=1 and A<=9 and B>=1 and B<=9:
    r = A*B
    print(r)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
N, D = map(int, input().split())
cnt =0
for _ in range(N):
    a, b = map(int, input().split())
    if np.sqrt(a**2+b**2)<=D:
        cnt+=1
print(cnt)

Fixed submission:
import numpy as np
N, D = map(int, input().split())
cnt =0
for _ in range(N):
    a, b = map(int, input().split())
    if np.sqrt(a**2+b**2)<=D:
        cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
cnt=0
mcnt=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        cnt+=1
        if mcnt<cnt:
            mcnt=cnt
    else:
        cnt=0

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
cnt=0
mcnt=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        cnt+=1
        if mcnt<cnt:
            mcnt=cnt
    else:
        cnt=0
print(mcnt)
Buggy python submission (verdict: Runtime Error):
S=input()
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
    max=count
  else:
    count=0
print(max)

Fixed submission:
S=list(input())
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
      max=count
  else:
    count=0
print(max)

Buggy python submission (verdict: Runtime Error):
S=input()
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
    max=count
  else:
    count=0
print(max)

Fixed submission:
S=list(input())
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
      max=count
  else:
    count=0
print(max)

Buggy python submission (verdict: Runtime Error):
S=input()
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
    max=count
  else:
    count=0
print(count)

Fixed submission:
S=list(input())
max=0
count=0
for i in range(len(S)):
  if S[i] == "A" or S[i] == "T" or S[i] == "C" or S[i] == "G":
    count+=1
    if max<count:
      max=count
  else:
    count=0
print(max)
Buggy python submission (verdict: Runtime Error):
N=int(input())
xu=[list(map(str, input().split())) for _ in range(N)]
total=0
for i in range(N):
    if xu[i][1]=='JPY':
        total+=float(xu[i][0])
    else:
        total+=380000.0*float(xu[i][0])

Fixed submission:
N=int(input().replace('/',''))
if N <= 20190430:
    print("Heisei")
else:
    print("TBD")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
h=[int(input()) for i in range(N)]
h.sort()
mindif=h[K-1]-h[0]
for i in range(N-K+1):
    tmp=h[i:i+K]
    dif=tmp[-1]-tmp[0]
    if mindif>dif:
        mindif=dif
print(mindif)


Fixed submission:
N,K=map(int,input().split())
h=[int(input()) for i in range(N)]
h.sort()
mindif=h[K-1]-h[0]
for i in range(N-K+1):
    dif=h[i+K-1]-h[i]
    if mindif>dif:
        mindif=dif
print(mindif)
Buggy python submission (verdict: Runtime Error):
N=int(input())
xyh=[list(map(int,input().split())) for i in range(N)]
MAX=100
for PosY in range(MAX+1):
    for PosX in range(MAX+1):
        needH=-1
        for i in range(N):
             if xyh[i][2]>0:
                tmp=xyh[i][2]+abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
                if needH==-1:
                    needH=tmp
                else:
                    if needH!=tmp:
                        needH=-2
                        break
        if needH==-2:
            continue
        for i in range(N):
            if xyh[i][2]==0:
                dist=abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
                if needH>dist:
                    needH=-2
                    break
        if needH==-2:
            continue
        print(PosX,PosY,needH)

Fixed submission:
N=int(input())
if N==1:
    print('Hello World')
if N==2:
    A=int(input())
    B=int(input())
    print(A+B)
Buggy python submission (verdict: Runtime Error):
MAX=100
for PosY in range(MAX+1):
    for PosX in range(MAX+1):
        needH=-1
        for i in range(N):
            tmp=xyh[i][2]+abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
            if needH==-1:
                needH=tmp
            else:
                if needH!=tmp:
                    needH=-2
                    break
        if needH==-2:
            continue
        for i in range(N):
            if xyh[i][2]==0:
                dist=abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
                if needH>dist:
                    needH=-2
                    break
        if needH==-2:
            continue
        print(PosX,PosY,needH)

Fixed submission:
N=int(input())
xyh=[list(map(int,input().split())) for i in range(N)]
MAX=100
for PosY in range(MAX+1):
    for PosX in range(MAX+1):
        needH=-1
        for i in range(N):
             if xyh[i][2]>0:
                tmp=xyh[i][2]+abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
                if needH==-1:
                    needH=tmp
                else:
                    if needH!=tmp:
                        needH=-2
                        break
        if needH==-2:
            continue
        for i in range(N):
            if xyh[i][2]==0:
                dist=abs(PosX-xyh[i][0])+abs(PosY-xyh[i][1])
                if needH>dist:
                    needH=-2
                    break
        if needH==-2:
            continue
        print(PosX,PosY,needH)
Buggy python submission (verdict: Runtime Error):
n=int(input())
N=list(map(int,input().split()))
even=[]
odd=[]
for i in range(len(N)):
    if i%2==0:
        even.append(N[i])
    if i%2==1:
        odd.append(N[i])
import collections
c = collections.Counter(even)
x=c.most_common()[0][0]
o=even.count(x)
d= collections.Counter(odd)
y=d.most_common()[0][0]
p=odd.count(y)
s=len(even)-even.count(x)
t=len(odd)-odd.count(y)
if x!=y and o==len(even) and p==len(odd):
    print(0)
elif x!=y:
    print(s+t)
elif x==y and o==len(even) and p==len(odd):
    print(n/2)
else:
    if o>p:
        y=d.most_common()[1][0]
        s=len(even)-even.count(x)
        t=len(odd)-odd.count(y)
        print(s+t)
    else:
        x=c.most_common()[1][0]
        s=len(even)-even.count(x)
        t=len(odd)-odd.count(y)
        print(s+t)
    
        


Fixed submission:
n=list(input())
for i in range(len(n)):
    if n[i]=='9':
        n[i]=1
    if n[i]=='1':
        n[i]=9
for i in range(len(n)):
    print(n[i],end='')
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
even=v[0::2]
odd=v[1::2]
import collections
c=collections.Counter(even)
d=collections.Counter(odd)
e=c.most_common()[0][0]
o=d.most_common()[0][0]
e2=c.most_common()[0][1]
o2=d.most_common()[0][1]
if e==o:
  	if even.count(e)==odd.count(o)==len(even):
        print(n/2)
    elif even.count(e)>odd.count(o):
        o=o2
    else:
        e=e2
count=len(v)-(even.count(e)+odd.count(o))
print(count)
    


Fixed submission:
n = int(input())
A = [int(x) for x in input().split()]

from collections import Counter
import operator
def f():
    a = Counter(A[::2]).most_common(2)
    b = Counter(A[1::2]).most_common(2)
    ac, bc = a[0][1], b[0][1]
    ret = n - (ac + bc)
    if a[0][0] == b[0][0]:
        bc_2 = b[1][1] if len(b) != 1 else 0
        ac_2 = a[1][1] if len(a) != 1 else 0
        ret = n - max(ac + bc_2, ac_2 + bc)
    return ret
print(f())

Buggy python submission (verdict: Runtime Error):
n=int(input())
N=list(map(int,input().split()))
even=[]
odd=[]
for i in range(len(N)):
    if i%2==0:
        even.append(N[i])
    if i%2==1:
        odd.append(N[i])
import collections
c = collections.Counter(even)
x=c.most_common()[0][0]
o=even.count(x)
d= collections.Counter(odd)
y=d.most_common()[0][0]
p=odd.count(y)
s=len(even)-even.count(x)
t=len(odd)-odd.count(y)
if x!=y and o==len(even) and p==len(odd):
    print(0)
elif x==y and o==len(even) and p==len(odd):
    print(n/2)
elif x==y and (o!=len(even) or p!=len(odd)):
    if o>p:
        y=d.most_common()[1][0]
        s=len(even)-even.count(x)
        t=len(odd)-odd.count(y)
        print(s+t)
    else:
        x=c.most_common()[1][0]
        s=len(even)-even.count(x)
        t=len(odd)-odd.count(y)
        print(s+t)
elif:
    print(s+t)
    
        


Fixed submission:
n = int(input())
A = [int(x) for x in input().split()]

from collections import Counter
import operator
def f():
    a = Counter(A[::2]).most_common(2)
    b = Counter(A[1::2]).most_common(2)
    ac, bc = a[0][1], b[0][1]
    ret = n - (ac + bc)
    if a[0][0] == b[0][0]:
        bc_2 = b[1][1] if len(b) != 1 else 0
        ac_2 = a[1][1] if len(a) != 1 else 0
        ret = n - max(ac + bc_2, ac_2 + bc)
    return ret
print(f())
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
x=list(map(int,input().split()))
absx=[]
for i in range(len(x)):
    absx.append(abs(x[i]-X))
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
print(gcd_list(absx))

Fixed submission:
N,X=map(int,input().split())
x=list(map(int,input().split()))
absx=[]
for i in range(len(x)):
    absx.append(abs(x[i]-X))
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)
print(gcd_list(absx))
Buggy python submission (verdict: Runtime Error):
S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[1])

Fixed submission:
S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[count])

Buggy python submission (verdict: Runtime Error):
S=list(input().split())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[1])

Fixed submission:
S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[count])
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=""
while N!=0:
    if N%2!=0:
        
        ans="1"+ans
        N-=1
    else:
        ans="0"+ans
    N=N/-2   
if ans="":
    ans="0"
print(ans)


Fixed submission:
N=int(input())
ans=""
while N!=0:
    if N%2!=0:
        
        ans="1"+ans
        N-=1
    else:
        ans="0"+ans
    N=N/-2   
if ans=="":
    ans="0"
print(ans)

Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=""
while N!=0:
    if N%2!=0:
        
        ans="1"+ans
        N-=1
    else:
        ans="0"+ans
    N=N/-2
if ans="":
    ans="0"
print(ans)


Fixed submission:
N=int(input())
ans=""
while N!=0:
    if N%2!=0:
        
        ans="1"+ans
        N-=1
    else:
        ans="0"+ans
    N=N/-2   
if ans=="":
    ans="0"
print(ans)
Buggy python submission (verdict: Runtime Error):
a=[int() for i in range(input().split())]
a.sort()
print(a[2]-a[0])

Fixed submission:
a = [int(i) for i in input().split()]
a.sort()
print(a[2]-a[0])
Buggy python submission (verdict: Runtime Error):
D,N=map(int,input().split())
print(100**D*N if N<100 else 100**D*101)

Fixed submission:
S=input()
sum=0
for i in range(len(S)):
    if S[i]=='+':
        sum+=1
    elif S[i]=='-':
        sum-=1
print(sum)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
n=b-a-1
print(int(h-a))

Fixed submission:
a,b=map(int,input().split())
n=b-a-1
h=n*(n+1)/2
print(int(h-a))
Buggy python submission (verdict: Runtime Error):
import numpy as np
X=int(input())
Y=int(np.sqrt(X))+1
max=1
for j in range(2,Y+1):
    for i in range(1,Y+1):
        if i**j<=X and i**j>max:
            max=i**j
print(max)

Fixed submission:
a, b, c, d = map(int, input().split())
ans="No"
ab=a-b
if ab<0:
    ab=-ab
bc=b-c
if bc<0:
    bc=-bc
ac=a-c
if ac<0:
    ac=-ac
if (ab<=d and bc<=d)or (ac<=d):
    ans="Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
X=int(input())
Y=int(np.sqrt(X))+1
max=1
for j in range(2,Y+1):
    for i in range(1,Y+1):
        if i**j<=X and i**j>max:
            max=i**j
print(max)


Fixed submission:
a, b, c, d = map(int, input().split())
ans="No"
ab=a-b
if ab<0:
    ab=-ab
bc=b-c
if bc<0:
    bc=-bc
ac=a-c
if ac<0:
    ac=-ac
if (ab<=d and bc<=d)or (ac<=d):
    ans="Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
X=int(input())
Y=int(math.sqr(X))+1
max=1
for j in range(2,Y+1):
    for i in range(1,Y+1):
        if i**j<=X and i**j>max:
            max=i**j
print(max)


Fixed submission:
a, b, c, d = map(int, input().split())
ans="No"
ab=a-b
if ab<0:
    ab=-ab
bc=b-c
if bc<0:
    bc=-bc
ac=a-c
if ac<0:
    ac=-ac
if (ab<=d and bc<=d)or (ac<=d):
    ans="Yes"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
X=int(input())
max=1
for j in range(2,X):
    for i in range(1,X):
        if i**j<=X and i**j>max:
            max=i**j
print(max)

Fixed submission:
import numpy as np
X=int(input())
Y=int(np.sqrt(X))+1
max=1
for j in range(2,Y+1):
    for i in range(1,Y+1):
        if i**j<=X and i**j>max:
            max=i**j
print(max)
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
r = "Yes"
for i in range(1, h-1):
    for j in range(1, w-1):
        if s[i][j] == "#" and s[i - 1][j] == "." and s[i + 1][j] == "." and s[i][j - 1] == "." and s[i][j + 1] == ".":
          r = "No"
print(r)


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

Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
k=int(input())
m=max(A,B,C)
print(A+B+C-m+m*2**k)


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

Buggy python submission (verdict: Runtime Error):
a,b=input().split()
print(a)
count=0
for i in range(a-1):
    count+=1
if a<b:
    count+=1
print(count)


Fixed submission:
a,b=map(int,input().split())
if a>b:
    print(a-1)
else:
    print(a)
Buggy python submission (verdict: Runtime Error):
a,b,k = list(map(int, input().split()))
for i in range(a, min(a+k, b+1)):
  print(i)
for i in range(max(a+k,b-k+1),b+1):
  print(i)

Fixed submission:
print("Yes"  if ''.join(sorted(list(input()))) == "abc" else "No")
Buggy python submission (verdict: Runtime Error):
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for i in range(N)]
sum=0
for i in range(len(A)):
    n=1
    while 1+(n-1)*A[i]<=D:
        sum+=1
        n+=1
    print(sum)
print(sum+X)
    
N=int(input())
D,X=map(int,input().split())
A=[int(input()) for i in range(N)]
sum=0
for i in range(len(A)):
    n=1
    while 1+(n-1)*A[i]<=D:
        sum+=1
        n+=1
print(sum+X)
    


Fixed submission:
print(min(int(input()),int(input()))+min(int(input()),int(input())))
Buggy python submission (verdict: Runtime Error):
if A+B>C+D:
    print("Left")
elif A+B==C+D:
    print("Balanced")
else:
    print("Right")

Fixed submission:
A,B,C,D=map(int,input().split())
if A+B>C+D:
    print("Left")
elif A+B==C+D:
    print("Balanced")
else:
    print("Right")
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(input().split())
num=int(A[0])
while num%2!=1 and num>0:
    num=num/2
    cnt+=1
mini=cnt
for i in range(N):
    cnt=0
    num=int(A[i])
    while num%2!=1 and num>0:
        num=num/2
        cnt+=1
    if cnt<mini:
        mini=cnt
print(mini)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
cnt = 0
 
while True:
    for i in range(len(A)):
        if A[i]%2 != 0:
            break
        elif A[i]%2 == 0:
            A[i] /= 2
    else:
        cnt += 1
        continue
    break
    
print(cnt)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(input().split())
num=int(A[0])
while num%2!=1 and num>0:
    num=num/2
    cnt+=1
mini=cnt
for i in range(N):
    cnt=0
    num=int(A[i])
    while num%2!=1 and num>0:
        num=num/2
        cnt+=1
    if cnt<mini:
        mini=cnt
print(mini)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
cnt = 0
 
while True:
    for i in range(len(A)):
        if A[i]%2 != 0:
            break
        elif A[i]%2 == 0:
            A[i] /= 2
    else:
        cnt += 1
        continue
    break
    
print(cnt)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(input().split())
num=int(A[0])
while num%2!=1 and num>0:
    num=num/2
    cnt+=1
mini=cnt
for i in range(N):
    cnt=0
    num=int(A[i])
    while num%2!=1 and num>0:
        num=num/2
        cnt+=1
    if cnt<mini:
        mini=cnt
print(mini)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
cnt = 0
 
while True:
    for i in range(len(A)):
        if A[i]%2 != 0:
            break
        elif A[i]%2 == 0:
            A[i] /= 2
    else:
        cnt += 1
        continue
    break
    
print(cnt)
Buggy python submission (verdict: Runtime Error):
N=int(input())
K=int(input()) 
S=list(map(int, input().split()))
total=0
for i in range(A):
    if abs(S[i]-K)<S[i]:
        total+=abs(S[i]-K)*2
    else:
        total+=2*S[i]
print(total)

Fixed submission:
N=int(input())
K=int(input()) 
S=list(map(int, input().split()))
total=0
for i in range(N):
    if abs(S[i]-K)<S[i]:
        total+=abs(S[i]-K)*2
    else:
        total+=2*S[i]
print(total)

Buggy python submission (verdict: Runtime Error):
N=int(input())
K=int(input()) 
S=list(map(int, input().split()))
total=0
for i in range(A):
    if abs(S[i]-K)<S[i]:
        total+=abs(S[i]-K)*2
    else:
        total+=2*S[i]

Fixed submission:
N=int(input())
K=int(input()) 
S=list(map(int, input().split()))
total=0
for i in range(N):
    if abs(S[i]-K)<S[i]:
        total+=abs(S[i]-K)*2
    else:
        total+=2*S[i]
print(total)
Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
x=int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')
r,g,b=map(int,input().spklit())
x=int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')


Fixed submission:
r,g,b=input().split()
x=int(r+g+b)

if x%4==0:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().spklit())
x=int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')

Fixed submission:
r,g,b=input().split()
x=int(r+g+b)

if x%4==0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
S=[list(map(int,input().split())) for i in range(M)]
for i in range(M):
    S[i].sort()
    for j in range(2):
        S[i][j]=str(S[i][j])
    S[i]=''.join(S[i])
S=list(set(S))
R=[0]*N
for i in range(N):
    n=i+1
    for j in range(M):
        for k in range(2):
            if S[j][k]==str(n):
                R[i]+=1
for i in range(N):
    print(R[i])


Fixed submission:
N,M=map(int,input().split())
S=[list(map(int,input().split())) for i in range(M)]
c=[0]*N
for i in range(M):
    for j in range(2):
        c[S[i][j]-1]+=1
for i  in range(N):
    print(c[i])