Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

alice = 0
bob = 0

A_rev = sorted(A, reverse=True)

while True:
    alice += A_rev.pop(0)
    bob += A_rev.pop(0)

    if len(A_rev) == 0:
        break

print(alice - bob)

Fixed submission:

def main():
    N = int(input())
    a = sorted(map(int, input().split()),reverse=True)      #降順のリスト

    alice = 0
    bob = 0

    for i in range(N):
        if i % 2 == 0:
            alice += a[i]

        else:
            bob += a[i]

    print(alice - bob)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    a = sorted(map(int, input().split()))[::-1]
    diff = sum([::2]) - sum([1::2])
    print(diff)


if __name__ == "__main__":
    main()

Fixed submission:

def main():
    N = int(input())
    a = sorted(map(int, input().split()),reverse=True)      #降順のリスト

    alice = 0
    bob = 0

    for i in range(N):
        if i % 2 == 0:
            alice += a[i]

        else:
            bob += a[i]

    print(alice - bob)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    a = sorted(map(int, input().split()))[::-1]
    diff = sum([::2]) - sum([1:2])
    print(diff)


if __name__ == "__main__":
    main()

Fixed submission:

def main():
    N = int(input())
    a = sorted(map(int, input().split()),reverse=True)      #降順のリスト

    alice = 0
    bob = 0

    for i in range(N):
        if i % 2 == 0:
            alice += a[i]

        else:
            bob += a[i]

    print(alice - bob)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())

for x in range(N+1):
    for y in range(N-x+1):
        z = N - x -y
        if 10000*a + 5000*b + 1000*c == Y:
            print(a, b, c)
        else:
            print(-1, -1, -1)

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

for a in range(N+1):
    for b in range(N-a+1):
        c = N - a -b
        if 10000*a + 5000*b + 1000*c == Y:
            print(a, b, c)
            exit()
else:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
count = 0

for i in range(N + 1):
    if A <= i <= B:
        count += sum(list(str(i)))

print(count)

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

for i in range(N + 1):
    if A <= sum(map(int, list(str(i)))) <= B:
        count  += i

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

s = int(input())
n = len(s) - 1
answer = 0
for i in range(2 ** n):
    operation = [""] * n
    for j in range(n):
        if (i >> j) & 1:
            operation[n - 1 -j] = "+"
    
    formula = ""
    for p_n, p_o in zip(s, operation + [""]):
        formula += (p_n + p_o)
    
    answer += eval(formula)

print(answer)

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

s = str(input())
n = len(s) - 1
answer = 0
for i in range(2 ** n):
    operation = [""] * n
    for j in range(n):
        if (i >> j) & 1:
            operation[n - 1 -j] = "+"
    
    formula = ""
    for p_n, p_o in zip(s, operation + [""]):
        formula += (p_n + p_o)
    
    answer += eval(formula)

print(answer)
Buggy python submission (verdict: Runtime Error):
N = map(int, input())
cards = list(map(int,input().split()))

cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]

a = sum_A - sum_B
print(a)

Fixed submission:
N = int(input())
cards = list(map(int,input().split()))
 
cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]
print(sum_A - sum_B)

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

cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]

print(sum_A - sum_B)

Fixed submission:
N = int(input())
cards = list(map(int,input().split()))
 
cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]
print(sum_A - sum_B)

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

cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]

print(sum_A - sum_B)

Fixed submission:
N = int(input())
cards = list(map(int,input().split()))
 
cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]
print(sum_A - sum_B)

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

num = cards.sort(reverse=True)

sum_A = 0
sum_B = 0

for i in range(N):
  if i % 2 == 0:
    sum_A += num[i]
  else:
    sum_B += num[i]

print(sum_A - sum_B)

Fixed submission:
N = int(input())
cards = list(map(int,input().split()))
 
cards.sort(reverse=True)
 
sum_A = 0
sum_B = 0
 
for i in range(N):
    if i % 2 == 0:
        sum_A += cards[i]
    else:
        sum_B += cards[i]
print(sum_A - sum_B)
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input().split())

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y:
            print(x, y, z)
            exit() # 処理を終わらせる
print(-1, -1, -1)

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

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y:
            print(x, y, N-x-y)
            exit() # 処理を終わらせる
print(-1, -1, -1)

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

for x in range(N+1):
    for y in range(N+1):
        for z in range(N+1):
            if 10000*x + 5000*y + 1000*z == Y and x+y+z==N:
                print(x, y, z)
                break
        else:
            continue
        break
    else:
        continue
    break

if x==N and y==N and z==N:
    print(-1, -1, -1)

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

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y:
            print(x, y, N-x-y)
            exit() # 処理を終わらせる
print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
 
count = 0
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] /= 2
        else:
            print(count)
            exit()
    count += 1
print(count)

Fixed submission:
s = input()
a = [int(c) for c in s]
b = 0
for i in a:
  if i == 1:
    b += 1
 
print(b)

Buggy python submission (verdict: Runtime Error):
N = int(input()) #1行目を取得する
a = list(map(int,input().split()))
 
num = 0
exist_odd = True
while exist_odd:
  num += 1
  for i in range(N):      
    if a[i] % 2 == 0:
      a[i] /= 2
    else:
      exist_odd = False
else:
  print(num - 1)

Fixed submission:
s = input()
a = [int(c) for c in s]
b = 0
for i in a:
  if i == 1:
    b += 1
 
print(b)

Buggy python submission (verdict: Runtime Error):
N = int(input()) #1行目を取得する
a = list(map(int,input().split()))
 
num = 0
exist_odd = True
while exist_odd:
  num += 1
  for i in range(N):
    if a[i] % 2 == 0:
      a[i] = a[i] / 2
    else:
      exist_odd = False
else:
  print(num - 1)

Fixed submission:
s = input()
a = [int(c) for c in s]
b = 0
for i in a:
  if i == 1:
    b += 1
 
print(b)

Buggy python submission (verdict: Runtime Error):
N = int(input()) #1行目を取得する
a = list(map(int,input().split()))
 
num = 0
exist_odd = True
while exist_odd:
  num += 1
  for i in range(N):
    if a[i] % 2 == 0:
      a[i] = a[i] / 2
    else:
      exist_odd = False

print(num - 1)

Fixed submission:
s = input()
a = [int(c) for c in s]
b = 0
for i in a:
  if i == 1:
    b += 1
 
print(b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
 
count = 0
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] /= 2
        else:
            print(count)
            break
    count += 1
print(count)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
 
count = 0
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i]//2
        else:
            print(count)
            exit()
    count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

count = 0
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] /= 2
        else:
            print(count)
            break
    count += 1
print(count)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
 
count = 0
while True:
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i]//2
        else:
            print(count)
            exit()
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
def coins(a,b,c,x):
    num=0
    for i in range(a):
        for w in range(b):
            for q in range(c):
                if 500*i + 100*w + 50*q == x:
                    num += 1
    return num
  
def main():
  a=input()
  b=input()
  c=input()
  x=input()
  print(coins(a,b,c,x))
 
if __name__ == '__main__':
    main()

Fixed submission:
def coins(a,b,c,x):
    num=0
    for i in range(a+1):
        for w in range(b+1):
            for q in range(c+1):
                if 500*i + 100*w + 50*q == x:
                    num += 1
    return num
  
def main():
  a=int(input())
  b=int(input())
  c=int(input())
  x=int(input())
  print(coins(a,b,c,x))
 
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def coins(a,b,c,x):
    num=0
    for i in range(a):
        for w in range(b):
            for q in range(c):
                if 500*i + 100*w + 50*q == x:
                    num += 1
    return num
  
def main():
  a,b,c,x=input()
  print(coins(a,b,c,x))
 
if __name__ == '__main__':
    main()

Fixed submission:
def coins(a,b,c,x):
    num=0
    for i in range(a+1):
        for w in range(b+1):
            for q in range(c+1):
                if 500*i + 100*w + 50*q == x:
                    num += 1
    return num
  
def main():
  a=int(input())
  b=int(input())
  c=int(input())
  x=int(input())
  print(coins(a,b,c,x))
 
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys

def main():
    args = sys.argv
    residual = ( int(args[1]) * int(args[2]) )%2
    if residual == 1:
        print("Odd")
    else :
        print("Even")

if __name__ == "__main__":
    main()

Fixed submission:
#import sys

def main():
    #args = sys.argv
    a, b = map(int, input().split())
    residual = ( a * b )%2
    if residual == 1:
        print("Odd")
    else :
        print("Even")

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import sys

def main():
    args = sys.argv
    residual = ( int(args[1]) * int(args[2]) )%2
    if residual == 1:
        print("Even")
    else :
        print("Odd")

if __name__ == "__main__":
    main()

Fixed submission:
#import sys

def main():
    #args = sys.argv
    a, b = map(int, input().split())
    residual = ( a * b )%2
    if residual == 1:
        print("Odd")
    else :
        print("Even")

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import sys
def main():
    input = sys.stdin.readline
    N, A, B = map(int,input.split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N, A, B = map(int,input().split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n, total = map(int, input().split())
min = n * 1000
max = n * 10000
if (total > max) or (total < min):
    print('-1 -1 -1')
else:
    min_man = (total - (5000 * n)) // 10000
    n -= min_man
    total -= min_man*10000
    min_sen = (total % 5000) // 1000
    total -= min_sen*1000
    n -= min_sen
    success = False
    for i in range(int(total // 10000)+1):
        if success:
            break
        ii = total - i*10000
        for j in range(int(ii // 5000)+1):
            jj = ii - j*5000
            k = jj//1000
            if i + j + k + min_sen + min_man == n:
                print(str(i+min_man) + ' ' + str(j) + ' ' + str(k+min_sen))
                success = True
                break

    if not success:
        print('-1 -1 -1')


Fixed submission:
n = int(input())
mochis = []
for i in range(n):
  mochis.append(int(input()))
print(len(set(mochis)))
Buggy python submission (verdict: Runtime Error):
n, total = map(int, input().split())
min = n * 1000
max = n * 10000
if (total > max) or (total < min):
  print('-1 -1 -1')
else
  min_man = total - (5000 * n) // 10000
  n -= min_man
  total -= min_man*10000
  min_sen = (total % 5000) / 1000
  total -= min_sen*1000
  n -= min_sen
  success = False
  for i in range(total // 10000):
    if success:
      break
    ii = total - i*10000
    for j in range(ii // 5000):
      jj = ii - j*5000
      k = jj/1000
      if i + j + k == n:
        print(str(i+min_man) + ' ' + str(j) + ' ' + str(k+min_sen))
        success = True
        break
     
  if not success:
    print('-1 -1 -1')

Fixed submission:
n, total = map(int, input().split())
# n, total = 2000, 20000000
min = n * 1000
max = n * 10000
if (total > max) or (total < min):
    print('-1 -1 -1')
else:
    min_man = (total - (5000 * n)) // 10000 if total - (5000 * n) > 0 else 0
    n -= min_man
    total -= min_man*10000
    min_sen = (total % 5000) // 1000
    total -= min_sen*1000
    n -= min_sen
    success = False
    if total == 0:
        print(str(min_man) + ' 0 ' + str(min_sen))
    else:
        for i in range(int(total // 10000)+1):
            if success:
                break
            ii = total - i*10000
            for j in range(int(ii // 5000)+1):
                jj = ii - j*5000
                k = jj//1000
                if i + j + k == n:
                    print(str(i+min_man) + ' ' + str(j) + ' ' + str(k+min_sen))
                    success = True
                    break

        if not success:
            print('-1 -1 -1')
Buggy python submission (verdict: Runtime Error):
n = int(input())
a=list(map(int, input().split()))
count = 0
success = True
while True:
    for i, ele in enumerate(a):
        if ele % 2 == 0:
            a[i] = ele / 2
        else:
            success = False
    if not success:
        break
    count += 1
print(count)

Fixed submission:
a = input()
print(int(a[0])+int(a[1])+int(a[2]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a=[]
for i in range(n):
  a.append(int(input()))
count = 0
success = True
while True:
  for i, ele in enumerate(a):
    if ele % 2 == 0:
      a[i] = ele / 2
    else:
      success = False
  if not success:
    break
  count += 1
print(count)

Fixed submission:
n = int(input())
a=list(map(int, input().split()))
count = 0
success = True
while True:
    for i, ele in enumerate(a):
        if ele % 2 == 0:
            a[i] = ele / 2
        else:
            success = False
    if not success:
        break
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
n=input()
rice=[]
for i in range(n):
    rice.append(input())

cake=[]
for i in range(n):
    if not(rice[i] in cake):
        cake.append(rice[i])

print(len(cake))




Fixed submission:
n=int(input())
rice=[]
for i in range(n):
    rice.append(input())

cake=[]
for i in range(n):
    if not(rice[i] in cake):
        cake.append(rice[i])

print(len(cake))

Buggy python submission (verdict: Runtime Error):
n=input()
rice=[]
for i in range(n):
    rice.append(input())

cake=[]
for i in range(n):
    if not(rice[i] in cake):
        cake.append(rice[i])

print(len(cake))




Fixed submission:
n=int(input())
rice=[]
for i in range(n):
    rice.append(input())

cake=[]
for i in range(n):
    if not(rice[i] in cake):
        cake.append(rice[i])

print(len(cake))
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
for x in range(N+1):
    for y in range(N+1-y):
        z=N-x-y
        if 10000*x+5000*y+1000*z==X:
            print(x,y,z)
            exit()
print(-1,-1,-1)
        

Fixed submission:
N,X=map(int,input().split())
for x in range(N+1):
    for y in range(N+1-x):
        z=N-x-y
        if ((10000*x+5000*y+1000*z==X)and(0<=z)):
            print(x,y,z)
            exit()
print(-1,-1,-1)
Buggy python submission (verdict: Runtime Error):


a,b = map(int,input().split())

if (a*b)%2 = 1:
  print('Odd')
else:
  print('Even')

Fixed submission:

a,b = map(int,input().split())

if (a*b)%2 == 1:
  print('Odd')
else:
  print('Even')
Buggy python submission (verdict: Runtime Error):
n = int(input())

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)

t[0] = 0
x[0] = 0
y[0] = 0

for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

aFlg = True #ダメとなるまでは見なしOK

for i in t:
  xm = 0
  ym = 0
  if i > 0:
    if x[i] > x[i-1]:
      xm = x[i] - x[i-1]
    else:
      xm = x[i-1] - x[i]

    if y[i] > y[i-1]:
      ym = y[i] - y[i-1]
    else:
      ym = y[i-1] - y[i]

    if xm + ym > t:  #動きすぎ
      aFlg = False
      break
    elif (t - (xm+ym))%2 == 1:  #そこには止まれない
      aFlg = False
      break

if aFlg:
  print('Yes')
else:
  print('No')
    

Fixed submission:
n = int(input())

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)

t[0] = 0
x[0] = 0
y[0] = 0

for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

aFlg = True #ダメとなるまでは見なしOK

for i,tm in enumerate(t):
  xm = 0
  ym = 0
  if i > 0:
    if x[i] > x[i-1]:
      xm = x[i] - x[i-1]
    else:
      xm = x[i-1] - x[i]

    if y[i] > y[i-1]:
      ym = y[i] - y[i-1]
    else:
      ym = y[i-1] - y[i]

    if xm + ym > (t[i] - t[i-1]):  #動きすぎ
      aFlg = False
      break
    elif ((t[i] - t[i-1]) - (xm+ym))%2 == 1:  #そこには止まれない
      aFlg = False
      break

if aFlg:
  print('Yes')
else:
  print('No')

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

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = [0] * n
x = [0] * n
y = [0] * n

t[0] = 0
x[0] = 0
y[0] = 0

for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

Fixed submission:
n = int(input())

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)

t[0] = 0
x[0] = 0
y[0] = 0

for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

aFlg = True #ダメとなるまでは見なしOK

for i,tm in enumerate(t):
  xm = 0
  ym = 0
  if i > 0:
    if x[i] > x[i-1]:
      xm = x[i] - x[i-1]
    else:
      xm = x[i-1] - x[i]

    if y[i] > y[i-1]:
      ym = y[i] - y[i-1]
    else:
      ym = y[i-1] - y[i]

    if xm + ym > (t[i] - t[i-1]):  #動きすぎ
      aFlg = False
      break
    elif ((t[i] - t[i-1]) - (xm+ym))%2 == 1:  #そこには止まれない
      aFlg = False
      break

if aFlg:
  print('Yes')
else:
  print('No')

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

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = (0) * n
x = (0) * n
y = (0) * n

t(0) = 0
x(0) = 0
y(0) = 0

for i in range(n):
  t(i+1),x(i+1),y(i+1) = map(int,input().split())

Fixed submission:
n = int(input())

#1行ずつ読んでやる方がスマートだけど、とりあえず見た目わかりやすい方で

t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)

t[0] = 0
x[0] = 0
y[0] = 0

for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

aFlg = True #ダメとなるまでは見なしOK

for i,tm in enumerate(t):
  xm = 0
  ym = 0
  if i > 0:
    if x[i] > x[i-1]:
      xm = x[i] - x[i-1]
    else:
      xm = x[i-1] - x[i]

    if y[i] > y[i-1]:
      ym = y[i] - y[i-1]
    else:
      ym = y[i-1] - y[i]

    if xm + ym > (t[i] - t[i-1]):  #動きすぎ
      aFlg = False
      break
    elif ((t[i] - t[i-1]) - (xm+ym))%2 == 1:  #そこには止まれない
      aFlg = False
      break

if aFlg:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import sys

dList = []

for i,d in sys.stdin:
  if i <> 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Fixed submission:
n = int(input())

dList = [int(input()) for i in range(n)]

print(len(set(dList)))

Buggy python submission (verdict: Runtime Error):
import sys

dList = list()

for i,d in sys.stdin:
  if i != 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Fixed submission:
n = int(input())

dList = [int(input()) for i in range(n)]

print(len(set(dList)))

Buggy python submission (verdict: Runtime Error):
import sys

dList = list()

for i,d in sys.stdin:
  if i <> 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Fixed submission:
n = int(input())

dList = [int(input()) for i in range(n)]

print(len(set(dList)))
Buggy python submission (verdict: Runtime Error):

s = string(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i = i + 1

print(i)

Fixed submission:
s = str(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i = i + 1

print(i)

Buggy python submission (verdict: Runtime Error):

s = string(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i == i + 1

print(i)

Fixed submission:
s = str(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i = i + 1

print(i)

Buggy python submission (verdict: Runtime Error):

s = string(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple
  if sb == '1':
    i == i + 1

print(i)

Fixed submission:
s = str(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i = i + 1

print(i)
Buggy python submission (verdict: Runtime Error):
N = input()  #一応読むけど、ループ回せば不要では
aList=input().split()


opCnt = 0
isAllE = True  #奇数見つかるまでは見なしTrue

while isAllE:
  for a in aList:
    if a%2 == 1:
      isAllE = False
  else:
    opCnt = opCnt + 1

print(opCnt)
      

Fixed submission:
N = input()  #一応読むけど、ループ回せば不要では
aList=input().split()

opCnt = 0
isAllE = True  #奇数見つかるまでは見なしTrue

while isAllE:
  for a in aList:
    if int(a)%2 == 1:
      isAllE = False
      break
  else:
    opCnt = opCnt + 1
    for i,a in enumerate(aList):
      aList[i] = int(int(a)/2)

print(opCnt)

Buggy python submission (verdict: Runtime Error):
N = input()  #一応読むけど、ループ回せば不要では
aList=input().split()


opCnt = 0
isAllE = True  #奇数見つかるまでは見なしTrue

while isAllE
  for a in aList:
    if a%2 == 1:
      isAllE = False
  else:
    opCnt = opCnt + 1

print(opCnt)

Fixed submission:
N = input()  #一応読むけど、ループ回せば不要では
aList=input().split()

opCnt = 0
isAllE = True  #奇数見つかるまでは見なしTrue

while isAllE:
  for a in aList:
    if int(a)%2 == 1:
      isAllE = False
      break
  else:
    opCnt = opCnt + 1
    for i,a in enumerate(aList):
      aList[i] = int(int(a)/2)

print(opCnt)