Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n=int(input())
nums=input().split()
counter=Counter(nums).most_common()
k=0
for num, c in counter:
    num=int(num)
    if num==c:
        continue
    elif num>c:
        for v in range(c):
            nums.remove(str(num))
            k+=1
    else:
        for v in range(c-num):
            nums.remove(str(num))
            k+=1   

print(k)

Fixed submission:
from collections import Counter
n=int(input())
counter=Counter(map(int,input().split()))
print(sum(c-num if c>=num else c for num,c in counter.items()))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nums=input().split()
nums_uniq=[]

for n in nums:
    if n not in nums_uniq:
        nums_uniq.append(n)

k=0
for p in nums_uniq:
    if nums.count(p)==int(p):
        continue
    elif nums.count(p)>int(p):
        while nums.count(p)>int(p):
            nums.remove(p)
            k+=1
    else:
        while nums.count(p)>0:
            nums.remove(p)
            k+=1
print(k)

Fixed submission:
from collections import Counter
n=int(input())
counter=Counter(map(int,input().split()))
print(sum(c-num if c>=num else c for num,c in counter.items()))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nums=input().split()
nums_uniq=[]

for n in nums:
    if n not in nums_uniq:
        nums_uniq.append(n)

#print('uniqnum',nums_uniq)
k=0
for p in nums_uniq:
    if nums.count(p)==int(p):
        continue
    elif nums.count(p)>int(p):
        while nums.count(p)>int(p):
            #print('remove',p)
            nums.remove(p)
            k+=1
    else:
        while nums.count(p)>0:
            #print('remove',p)
            nums.remove(p)
            k+=1
print(k)

Fixed submission:
from collections import Counter
n=int(input())
counter=Counter(map(int,input().split()))
print(sum(c-num if c>=num else c for num,c in counter.items()))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nums=input().split()
firstl=len(nums)
nums.sort()
nums_uniq=[]

for n in nums:
    if n not in nums_uniq:
        nums_uniq.append(n)

#print('uniqnum',nums_uniq)
s=0
for num in nums_uniq:
    s+=int(num)
if len(nums)-s>0:
    print(len(nums)-s)
else:
    k=0
    for p in nums_uniq:
        if nums.count(p)==int(p):
            continue
        else:
            if nums.count(p)>int(p):
                while nums.count(p)>int(p):
                    #print('remove',p)
                    nums.remove(p)
                    k+=1
            else:
                while nums.count(p)>0:
                    #print('remove',p)
                    nums.remove(p)
                    k+=1
    print(k)

Fixed submission:
from collections import Counter
n=int(input())
counter=Counter(map(int,input().split()))
print(sum(c-num if c>=num else c for num,c in counter.items()))
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
if n*a>b:
  print(b)
else print(a)

Fixed submission:
n,a,b=map(int,input().split())
if n*a>b:
  print(b)
else:
    print(n*a)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
nums=list(map(int,input().split()))

nums.sort()
nums.reverse()
ans=list()

for v in range(0,k):
    ans.append(nums[v])

print(sum(ans))

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

jud=False

if a%3==0:
    jud=True
elif b%3==0:
    jud=True
elif (a+b)%3==0:
    jud=True
else:
    jud=False

if jud==True:
    print("Possible")
else:
    print("Impossible")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nums=input().split()
b=list()

for var in range(0,n):
    b.append(nums[var])
    b=b[::-1]

ans=" ".join(b)
print(ans)

Fixed submission:
n=int(input())
nums=input().split()
n1=nums[::2]
n2=nums[1::2]

if len(nums)%2==0:
    ans=" ".join(n2[::-1])+" "+" ".join(n1)
else:
    ans = " ".join(n1[::-1]) + " " + " ".join(n2)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
nums=input().split()
b=list()

for var in range(0,n):
    b.append(nums[var])
    b.reverse()

ans=" ".join(b)
print(ans)

Fixed submission:
n=int(input())
nums=input().split()
n1=nums[::2]
n2=nums[1::2]

if len(nums)%2==0:
    ans=" ".join(n2[::-1])+" "+" ".join(n1)
else:
    ans = " ".join(n1[::-1]) + " " + " ".join(n2)

print(ans)
Buggy python submission (verdict: Runtime Error):
nums=input()
nums=nums.replace(" ","")
nums=nums.replace(nums[0],"")
nums=int(nums)
if nums%4==0:
    print("YES")
else:
    print("NO")

Fixed submission:
nums=input()
nums=nums.replace(" ","")
nums=int(nums)
if nums%4==0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
str1=input()
str2=input()
str3=input()

if str1[-1:]==str2[:1] and str2[-1:]==str3[:1]:
    print("YES")
else:
    print("NO")

Fixed submission:
str1,str2,str3=input().split()
if str1[-1:]==str2[:1] and str2[-1:]==str3[:1]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
str1=input()
str2=input()
str3=input()

slice1=str1[-1:]
slice2=str2[:1]
slice3=str2[-1:]
slice4=str3[:1]

if slice1==slice2 and slice3==slice4:
    print("YES")
else:
    print("NO")


Fixed submission:
str1,str2,str3=input().split()
if str1[-1:]==str2[:1] and str2[-1:]==str3[:1]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
s=list(map(int,input().split()))
ans=[]
a=int(s[1]/10000)
b=int(s[1]/5000)
c=int(s[1]/1000)
for i in range(0,a+1):
    for j in range(0,b+1):        
        for k in range(0,c+1):
            check=10000*i+5000*j+1000*k
            if(check==s[1]):
                if(i+j+k==s[0]):
                    ans.append(i)
                    ans.append(j)
                    ans.append(k)
                    break
                
if(ans==[]):
    print('-1 -1 -1')
else:
    print('{} {} {}'.format(ans[0],ans[1],ans[2]))    

Fixed submission:
s=list(map(int,input().split()))
ans=[]
a=int(s[1]/10000)
b=int(s[1]/5000)
c=int(s[1]/1000)
for i in range(0,a+1):
    for j in range(0,b+1):
        if(s[0]-i-j>=0):        
            check=10000*i+5000*j+1000*(s[0]-i-j)
            if(check==s[1]):
                ans.append(i)
                ans.append(j)
                ans.append(s[0]-i-j)
                break
                
if(ans==[]):
    print('-1 -1 -1')
else:
    print('{} {} {}'.format(ans[0],ans[1],ans[2]))

Buggy python submission (verdict: Time Limit Exceeded):
N, Y = map(int, input().split())

N_man_max = Y // 10000
N_gos_max = Y // 5000
N_sen_max = Y // 1000
flag = False
for i in range(N_man_max +1):
    if flag == True:
        break
    for j in range(N_gos_max +1 - i):
        for k in range(N_sen_max +1 - i - j):
            if 10000*i + 5000*j + 1000*k == Y and i+j+k == N:
                print(i,j,k)
                flag = True
if flag == False:
    print(-1, -1, -1)

Fixed submission:
N, Y = map(int, input().split())
flag = False

for x in range(N+1):
    if flag == True:
        break
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y:
            print(x, y, N-x-y)
            flag = True
            break

if flag == False:
    print(-1, -1, -1)

Buggy python submission (verdict: Time Limit Exceeded):
N, Y = map(int, input().split())

N_man_max = Y // 10000
N_gos_max = Y // 5000
N_sen_max = Y // 1000
flag = False
for i in range(N_man_max +1):
    if flag == True:
        break
    for j in range(N_gos_max +1):
        for k in range(N_sen_max +1):
            if 10000*i + 5000*j + 1000*k == Y and i+j+k == N:
                print(i,j,k)
                flag = True
if flag == False:
    print(-1, -1, -1)

Fixed submission:
N, Y = map(int, input().split())
flag = False

for x in range(N+1):
    if flag == True:
        break
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y:
            print(x, y, N-x-y)
            flag = True
            break

if flag == False:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
S = list(input())

def hantei(S):
    flag = True
    if S[0:5] == list('dream'):
        del(S[0:5])
        if S[0:2] == list('er') and S[2] != 'a':
            del(S[0:2])
    elif S[0:5] == list('erase'):
        del(S[0:5])
        if S[0:1] == list("r"):
            del(S[0])
    else:
        flag = False
    return S, flag

S, flag = hantei(S)
while flag == True:
    if len(S) == 0:
        print("YES")
        break
    S, flag = hantei(S)
if flag == False:
    print("NO")

Fixed submission:
S = list(input())

flag = True
while flag == True:
    if len(S) == 0:
        break
    if len(S) >= 5:
        if S[-5:] == list("dream"): del S[-5:]
        elif S[-5:] == list("erase"): del S[-5:]
        elif len(S)>=6 and S[-6:] == list("eraser"): del S[-6:]
        elif len(S)>=7 and S[-7:] == list("dreamer"): del S[-7:]
        else:
            flag = False
    else:
        flag = False
if flag:
    print("YES")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
S = list(input())

def hantei(S):
    flag = True
    if S[0:5] == list('dream'):
        del(S[0:5])
        if S[0:2] == list('er') and S[2] != 'a':
            del(S[0:2])
    elif S[0:5] == list('erase'):
        del(S[0:5])
        if S[0:1] == list("r"):
            del(S[0])
    else:
        flag = False
    return S, flag

flag = True
while flag == True:
    if len(S) == 0:
        print("YES")
        break
    S, flag = hantei(S)
if flag == False:
    print("NO")

Fixed submission:
S = list(input())

flag = True
while flag == True:
    if len(S) == 0:
        break
    if len(S) >= 5:
        if S[-5:] == list("dream"): del S[-5:]
        elif S[-5:] == list("erase"): del S[-5:]
        elif len(S)>=6 and S[-6:] == list("eraser"): del S[-6:]
        elif len(S)>=7 and S[-7:] == list("dreamer"): del S[-7:]
        else:
            flag = False
    else:
        flag = False
if flag:
    print("YES")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
from math import ceil
a,b = map(int, input().split())
print(ceil((a+b)/2)

Fixed submission:
from math import ceil
a,b = map(int, input().split())
print(ceil((a+b)/2))
Buggy python submission (verdict: Runtime Error):
s = map(input())
count = 0
if s[0] == '1':
  count += 1
if s[1] == '1':
  count +=1
if s[2] == '1':
  count += 1
print(count)

Fixed submission:
s = list(map(int, input()))
count = 0
for i in range(len(s)):
  if s[i] == 1:
    count +=1
print(count)
Buggy python submission (verdict: Runtime Error):
#!/user/bin/env pypy3
import itertools
import sys


def fast_input():
    return sys.stdin.readline()[:-1]


def print_format(b: bool) -> str:
    return "YES" if b else "NO"


def solve(s: str) -> bool:
    tokens = ["dream", "erase", "eraser", "dreamer"]

    def dfs(pos: int) -> bool:
        if pos == len(s):
            return True
        for token in tokens:
            if (pos + len(token)) > len(s):
                break
            if s[pos:pos + len(token)] == token:
                if dfs(pos + len(token)):
                    return True

    return dfs(0)


def main():
    result = solve(fast_input())
    print(print_format(result))


main()


Fixed submission:
#!/user/bin/env pypy3
import itertools
import sys


def fast_input():
    return sys.stdin.readline()[:-1]


def print_format(b: bool) -> str:
    return "YES" if b else "NO"


def solve(s: str) -> bool:
    for p in itertools.permutations(["dreamer", "eraser", "dream", "erase"]):
        work = s
        for token in p:
            work = work.replace(token, '')
        if work == "":
            return True
    return False


def main():
    result = solve(fast_input())
    print(print_format(result))


main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
prev_t = 0
for i in range(n):
    t, x, y=map(int, input().split())
    if (x + y) > (t - prev_t) or (x + y + (t - prev_t)) % 2:
        print("No")
        exit()
    prev_t = t
print("Yes")

Fixed submission:
from sys import stdin
a,b = [int(x) for x in stdin.readline().rstrip().split()]

x = a*b

if x % 2 == 1:
    print('Odd')
else:
    print('Even')
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
n = stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
b = 0

print(a)

while True:
   if all([x % 2 == 0 for x in a]):
      a = [x/2 for x in a]
      b += 1
   else:
      break

print(b)

Fixed submission:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
n = stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
b = 0

print(a)

while True:
   if all([x % 2 == 0 for x in a]):
      a = [x/2 for x in a]
      b += 1
   else:
      break

print(b)

Fixed submission:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Buggy python submission (verdict: Runtime Error):
from sys import stdin
a = [int(x) for x in list(stdin.readline())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Fixed submission:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Buggy python submission (verdict: Runtime Error):
from sys import stdin
a = [int(x) for x in list(stdin.readline())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Fixed submission:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Buggy python submission (verdict: Runtime Error):
from sys import stdin
a = [int(x) for x in list(stdin.readline())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Fixed submission:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(input().split())
A = list(map(int,A))
A = sorted(A,reverse = True)
a = 0
b = 0
while len(A) != 0 :
  a += A.pop(0)
  b += A.pop(0)
print(a-b)

Fixed submission:
N = input()
A = list(input().split())
A = list(map(int,A))
A = sorted(A,reverse = True)
a = 0
b = 0
try :
  while len(A) != 0 :
    a += A.pop(0)
    b += A.pop(0)
  print(a-b)
except IndexError :
  print(a-b)
Buggy python submission (verdict: Runtime Error):
N = int(input())
xy=[]
try :
  while True:
    t = input().split()
    t = list(map(int,t))
    xy.append(t)
except EOFError:
  pass
loc = [0,0]
time = 0
for i in range(N+1):
  a = xy[i]
  time = a[0]-time
  dis = abs(loc[0]-a[1])+abs(loc[1]-a[2])
  if (time-dis)<0 :
    print("No")
    break
  elif (time-dis)%2 == 0:
    loc = [a[1],a[2]]
    
  else :
    print("No")
    break
else :
  print("Yes")

Fixed submission:
N = int(input())

locx = 0
locy =0
time = 0
for i in range(N):
  t,x,y = map(int,input().split())
  nowtime = t-time
  dis = abs(locx-x)+abs(locy-y)
  if (nowtime-dis)<0 :
    print("No")
    exit()
  if (nowtime-dis)%2 == 1:
    print("No")
    exit()
    
  
  time = t
  locx = x
  locy = y
    
  
else :
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int,input().split()))
c = 0
d = -1
while c>d:
  d+=1
  for i in A:
    if i%2 == 0:
      continue
    else :
      print(c)
      break
  else :
    A=list(map(lambda x :x/2,A))
    c += 1



Fixed submission:
mass = input()
s1 = int(mass[0])
s2 = int(mass[1])
s3 = int(mass[2])
c = 0
if s1 == 1:
  c += 1
if s2 == 1:
  c += 1
if s3 == 1:
  c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
ｖa,b = [int(x) for x in input().split()]

if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")

Fixed submission:
a,b = [int(x) for x in input().split()]

if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
s = list(input())

a = list("dream")
b = list("dreamer")
c = list("erase")
d = list("eraser")
flag = 0

while(flag == 0):
    print(s)
    if s[-7:] == b:
        del s[-7:]
    elif s[-6:] == d:
        del s[-6:]
    elif s[-5:] == a or s[-5:] == c:
        del s[-5:]
    elif s == []:
        print("YES")
        flag = 1
    else:
        print("NO")
        flag = 1

Fixed submission:
s = list(input())

a = list("dream")
b = list("dreamer")
c = list("erase")
d = list("eraser")
flag = 0

while(flag == 0):
    if s[-7:] == b:
        del s[-7:]
    elif s[-6:] == d:
        del s[-6:]
    elif s[-5:] == a or s[-5:] == c:
        del s[-5:]
    elif s == []:
        print("YES")
        flag = 1
    else:
        print("NO")
        flag = 1
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

a, b = map(int, input().sprit())
c = (a & b) & 1
if c == 1:
  print("odd")
else:
  print("even")
  

Fixed submission:
# coding: utf-8
a, b = map(int, input().split())
c = (a & b) & 1
if c == 1:
  print("Odd")
else:
  print("Even")
Buggy python submission (verdict: Runtime Error):
n=int(input())
A=[int(x) for x in input().split()]
B=sorted(A)
Alice=[]
Bob=[]
while len(B)!=0 or len(B)!=1:
  Alice.append(B[-1])
  B.pop()
  Bob.append(B[-1])
  B.pop()
if len(B)==1:
  Alice.append(B[0])
  B.pop()
print(sum(Alice)-sum(Bob))

Fixed submission:
n=int(input())
A=[int(x) for x in input().split()]
B=sorted(A)
Alice=[]
Bob=[]
while len(B)!=0 and len(B)!=1:
  Alice.append(B[-1])
  B.pop()
  Bob.append(B[-1])
  B.pop()
if len(B)==1:
  Alice.append(B[0])
  B.pop()
print(sum(Alice)-sum(Bob))

Buggy python submission (verdict: Runtime Error):
n=int(input())
A=[int(x) for x in input().split()]
B=sorted(A)
Alice=[]
Bob=[]
while len(B)!=0 or len(B)!=1:
  Alice.append(B[-1])
  B.pop()
  Bob.append(B[1-])
  B.pop()
if len(B)==1:
  Alice.append(B[0])
  B.pop()
print(sum(Alice)-sum(Bob))

Fixed submission:
n=int(input())
A=[int(x) for x in input().split()]
B=sorted(A)
Alice=[]
Bob=[]
while len(B)!=0 and len(B)!=1:
  Alice.append(B[-1])
  B.pop()
  Bob.append(B[-1])
  B.pop()
if len(B)==1:
  Alice.append(B[0])
  B.pop()
print(sum(Alice)-sum(Bob))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
s=int(input())
n=0
for x in range(a):
  for y in range(b):
    for z in range(c):
      if 500x+100y+50z==s:
        n=n+1
print(n)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
s=int(input())
n=0
for x in range(a+1):
    for y in range(b+1):
        for z in range(c+1):
            if 500*x+100*y+50*z==s:
                n=n+1
print(n)
Buggy python submission (verdict: Runtime Error):
n, m = (int(x) for x in input().split())
if int((n+m)/2)==n+m:
  print(Even)
else:
  print(Odd)

Fixed submission:
n, m = (int(x) for x in input().split())
if int((n*m)/2)==(n*m)/2:
  print('Even')
else:
  print('Odd')
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=[input() for i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.popleft()
print(len(B))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.pop(0)
print(len(B))

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=[input() i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.popleft()
print(len(B))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.pop(0)
print(len(B))
Buggy python submission (verdict: Runtime Error):
n,a,b=(int(x) for x in input().split())
c=0
def sual(N,A,B):
  l=list('{}'.format(N))
  s=sum(l)
  if A<=s<=B:
    return True
  else:
    return False
for x in range(n):
  if sual(x+1,a,b):
    c=c+x+1
print(c)


Fixed submission:
n,a,b=(int(x) for x in input().split())
c=0
d=[]
def sual(N,A,B):
  l=list('{}'.format(N))
  for y in range(len(l)):
      d.append(int(l[y]))
  e=sum(d)
  d.clear()
  if A<=e<=B:
    return True
  else:
    return False

for x in range(n):
  if sual(x+1,a,b):
    c=c+x+1
print(c)

Buggy python submission (verdict: Runtime Error):
n,a,b=int(x) for x in input().split()
c=0
def sual(N,A,B):
  l=list('{}'.format(N))
  s=sum(l)
  if A<=s<=B:
    return True
  else:
    return False
for x in range(n):
  if sual(x+1,a,b):
    c=c+x+1
print(c)

Fixed submission:
n,a,b=(int(x) for x in input().split())
c=0
d=[]
def sual(N,A,B):
  l=list('{}'.format(N))
  for y in range(len(l)):
      d.append(int(l[y]))
  e=sum(d)
  d.clear()
  if A<=e<=B:
    return True
  else:
    return False

for x in range(n):
  if sual(x+1,a,b):
    c=c+x+1
print(c)
Buggy python submission (verdict: Runtime Error):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
print(t)

Fixed submission:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
print(t)


Fixed submission:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
    
print(t)


Fixed submission:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
    print(b)
  t=t+1
  print(t)
    
print(t)


Fixed submission:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)

Buggy python submission (verdict: Runtime Error):
x=input()
X=list('{}'.format(x))
A=sum(X)
print(A)

Fixed submission:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=0
s=sum(b)
while s%2==0:
  for i in range(N):
    b[i]=b[i]/2
    t=t+1
print(t)

Fixed submission:
N=int(input())
a=[int(x) for x in input().split()]
b=a
t=-1
s=0
while s==0:
  for i in range(N):
    if b[i]%2!=0:
      s=1
    b[i]=b[i]/2
  t=t+1
print(t)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if a*b/2 == 0:
    print(Even)
else:
    print(Odd)

Fixed submission:
a,b = map(int, input().split())
if a*b%2 == 0:
    print("Even")
else:
    print("Odd")