Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
H_list = list(map(int, input().split()))
road_list = []

graph_list = [[] for i in range(N)]

for m in range(M):
    A, B = map(int, input().split())
    road_list.append([A, B])

    A -= 1
    B -= 1

    graph_list[A].append(B)
    graph_list[B].append(A)

visited = [False] * N
visited[0] = True
LorS_list = [0] * N

def dfs(current, graph_list):

    global LorS_list
    global visited

    for i in graph_list[current]:
        if visited[i] == False:
            visited[i] = True


            if H_list[current] > H_list[i] and LorS_list[current] != 1:
                LorS_list[current] = 2
                LorS_list[i] = 1

            elif H_list[current] < H_list[i] and LorS_list[i] != 1:
                LorS_list[current] = 1
                LorS_list[i] = 2

            elif H_list[current] == H_list[i]:
                LorS_list[current] = 1
                LorS_list[i] = 1

            dfs(i, graph_list)

dfs(0, graph_list)
ans = LorS_list.count(2) + visited.count(False)

print(ans)

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

good_list = [True] * N

for i in range(M):
    A, B = map(int, input().split())
    A -= 1
    B -= 1

    if H_list[A] > H_list[B]:
        good_list[B] = False
    elif H_list[A] < H_list[B]:
        good_list[A] = False
    elif H_list[A] == H_list[B]:
        good_list[A] = False
        good_list[B] = False

ans = good_list.count(True)
print(ans)





# import sys
# sys.setrecursionlimit(100000000)

# N, M = map(int, input().split())
# H_list = list(map(int, input().split()))
# road_list = []


# graph_list = [[] for i in range(N)]

# for m in range(M):
#     A, B = map(int, input().split())
#     road_list.append([A, B])

#     A -= 1
#     B -= 1

#     graph_list[A].append(B)
#     graph_list[B].append(A)

# visited = [False] * N
# visited[0] = True
# LorS_list = [0] * N

# def dfs(current, graph_list):

#     global LorS_list
#     global visited

#     if len(graph_list[current]) == 0:
#         LorS_list[current] = 2

#     for i in graph_list[current]:
#         if visited[i] == False:
#             visited[i] = True


#             if H_list[current] > H_list[i] and LorS_list[current] != 1:
#                 LorS_list[current] = 2
#                 LorS_list[i] = 1

#             elif H_list[current] < H_list[i] and LorS_list[i] != 1:
#                 LorS_list[current] = 1
#                 LorS_list[i] = 2

#             elif H_list[current] == H_list[i]:
#                 LorS_list[current] = 1
#                 LorS_list[i] = 1

#             dfs(i, graph_list)


# start = 0
# while all(visited) == False:
#     visited[start] = True
#     dfs(start, graph_list)

#     if False in visited:
#         start = visited.index(False)



# ans = LorS_list.count(2)

# print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(x, y):
    if x < y:
        x, y = y, x
    while x % y != 0:
        x, y = y, x % y
    return y


def gcd_3(x, y, z):
    x_y = gcd(x, y)
    return gcd(x_y, z)


K = int(input())
ans = 0

sum_list = []


for i in range(1, K + 1):
    for j in range(1, K + 1):
        for k in range(1, K + 1):
            ans += gcd(gcd(i, j), k)

print(ans)

Fixed submission:

import math
k = int(input())
s = 0
box = [0]*(k+1)
for l in range (1,k+1):
     for m in range (1, k+1):
          box[math.gcd(l,m)] += 1
for l in range (1,k+1):
     for n in range (1, k+1):
          s += math.gcd(l,n)*box[l]
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(x, y):
    if x < y:
        x, y = y, x
    while x % y != 0:
        x, y = y, x % y
    return y


def gcd_3(x, y, z):
    x_y = gcd(x, y)
    return gcd(x_y, z)


K = int(input())
ans = 0

sum_list = []


for i in range(1, K + 1):
    for j in range(1, K + 1):
        for k in range(1, K + 1):
            ans += gcd_3(i, j, k)

print(ans)

Fixed submission:

import math
k = int(input())
s = 0
box = [0]*(k+1)
for l in range (1,k+1):
     for m in range (1, k+1):
          box[math.gcd(l,m)] += 1
for l in range (1,k+1):
     for n in range (1, k+1):
          s += math.gcd(l,n)*box[l]
print(s)
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc159/tasks/abc159_d

N = int(input())
A_list = list(map(int, input().split()))

box = [0] * (N + 1)
box_2 = [0] * (N + 1)
box_3 = [0] * (N + 1)

for i in range(N):
    box[A_list[i] + 1] += 1

for i in range(N + 1):
    if box[i] > 1:
        box_2[i] = (box[i] * (box[i] - 1)) / 2
        box_3[i] = ((box[i] - 1) * (box[i] - 2)) / 2

ans_base = sum(box_2)

for i in range(N):

    if box[A_list[i] + 1] > 0:
        diff = box_2[A_list[i] + 1] - box_3[A_list[i] + 1]
        print(int(ans_base - diff))
    else:
        print(int(ans_base))
    


Fixed submission:
# https://atcoder.jp/contests/abc159/tasks/abc159_d

N = int(input())
A_list = list(map(int, input().split()))

box = [0] * (N + 1)
box_2 = [0] * (N + 1)
box_3 = [0] * (N + 1)

for i in range(N):
    box[A_list[i]] += 1

for i in range(N + 1):
    if box[i] > 1:
        box_2[i] = (box[i] * (box[i] - 1)) / 2
        box_3[i] = ((box[i] - 1) * (box[i] - 2)) / 2

ans_base = sum(box_2)

for i in range(N):

    if box[A_list[i]] > 0:
        diff = box_2[A_list[i]] - box_3[A_list[i]]
        print(int(ans_base - diff))
    else:
        print(int(ans_base))

Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc159/tasks/abc159_d

N = int(input())
A_list = list(map(int, input().split()))

box = [0] * (N + 1)
box_2 = [0] * (N + 1)
box_3 = [0] * (N + 1)

for i in range(N):
    box[A_list[i] + 1] += 1

for i in range(N):
    if box[i] > 1:
        box_2[i] = (box[i] * (box[i] - 1)) / 2
        box_3[i] = ((box[i] - 1) * (box[i] - 2)) / 2

ans_base = sum(box_2)

for i in range(N):

    if box[A_list[i]] > 0:
        diff = box_2[A_list[i]] - box_3[A_list[i]]
        print(int(ans_base - diff))
    else:
        print(int(ans_base))
    


Fixed submission:
# https://atcoder.jp/contests/abc159/tasks/abc159_d

N = int(input())
A_list = list(map(int, input().split()))

box = [0] * (N + 1)
box_2 = [0] * (N + 1)
box_3 = [0] * (N + 1)

for i in range(N):
    box[A_list[i]] += 1

for i in range(N + 1):
    if box[i] > 1:
        box_2[i] = (box[i] * (box[i] - 1)) / 2
        box_3[i] = ((box[i] - 1) * (box[i] - 2)) / 2

ans_base = sum(box_2)

for i in range(N):

    if box[A_list[i]] > 0:
        diff = box_2[A_list[i]] - box_3[A_list[i]]
        print(int(ans_base - diff))
    else:
        print(int(ans_base))
Buggy python submission (verdict: Runtime Error):
import numpy as np

A_list = []

for i in range(3):
    a = list(map(int, input().split()))
    A_list.append(a)

N = int(input())
narray = np.zeros((3, 3), dtype=np.int)


for j in range(N):
    b = int(input())

    for n in range(3):
        for m in range(3): 
            if A_list[n][m] == b:
                narray[n, m] = 1


n_list = np.count_nonzero(narray == 1, axis = 0)
m_list = np.count_nonzero(narray == 1, axis = 1)

if 3 in n_list or 3 in m_list:
    print('Yes')
    exit()

if narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:
    print('Yes')
    exit()

if narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:
    print('Yes')
    exit()

print('No')

Fixed submission:
# https://atcoder.jp/contests/abc157/tasks/abc157_b

A_list = [[] for _ in range(3)]

for i in range(3):
    A1, A2, A3 = map(int, input().split())
    A_list[i] += [A1, A2, A3]

N = int(input())

set1 = {A_list[0][0], A_list[0][1], A_list[0][2]}
set2 = {A_list[1][0], A_list[1][1], A_list[1][2]}
set3 = {A_list[2][0], A_list[2][1], A_list[2][2]}
set4 = {A_list[0][0], A_list[1][0], A_list[2][0]}
set5 = {A_list[0][1], A_list[1][1], A_list[2][1]}
set6 = {A_list[0][2], A_list[1][2], A_list[2][2]}
set7 = {A_list[0][0], A_list[1][1], A_list[2][2]}
set8 = {A_list[0][2], A_list[1][1], A_list[2][0]}


b_set = set()

for n in range(N):
    b = int(input())
    b_set.add(b)

if (set1 <= b_set or 
    set2 <= b_set or
    set3 <= b_set or
    set4 <= b_set or
    set5 <= b_set or
    set6 <= b_set or
    set7 <= b_set or
    set8 <= b_set):

    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
N_list = [0] * N
N_set_list = [False] * N

for i in range(M):
  s, c = map(int, input().split())
  s -= 1
  
  if s > N -1 or (s == 0 and c == 0):
    print(-1)
    exit()

  elif N_set_list[s] and (N_list[s] != c):
    print(-1)
    exit()

  else:
    N_list[s] = c
    N_set_list[s] = True

if N_list[0] == 0 and len(N_list) != 1
  N_list[0] = 1

print(''.join(map(str, N_list)))


Fixed submission:
N, M = map(int, input().split())
N_list = [0] * N
N_set_list = [False] * N

for i in range(M):
  s, c = map(int, input().split())
  s -= 1
  
  if s > N -1 or (s == 0 and c == 0 and N != 1):
    print(-1)
    exit()

  elif N_set_list[s] and (N_list[s] != c):
    print(-1)
    exit()

  else:
    N_list[s] = c
    N_set_list[s] = True

if N_list[0] == 0 and N != 1:
  N_list[0] = 1

print(''.join(map(str, N_list)))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S_list = []
S_count_list = []
S_set = set()

for n in range(N):
    s = input()

    if s in S_set:
        index_s = S_list.index(s)
        S_count_list[index_s] += 1
    
    else:
        S_set.add(s)
        S_list.append(s)
        S_count_list.append(1)

max_list = [i for i, v in enumerate(S_count_list) if v == max(S_count_list)]

max_S_list = []
for i in max_list:
    max_S_list.append(S_list[i])

max_S_list.sort()

for ans_s in max_S_list:
    print(ans_s)


Fixed submission:
N = int(input())
S_dic = {}

for n in range(N):
    S = input()

    if S in S_dic:
        S_dic[S] += 1
    else:
        S_dic[S] = 1


# 最大のvalueを取得する
max_value = max(S_dic.values())

max_S_list = [k for k, v in S_dic.items() if v == max_value]
max_S_list = sorted(max_S_list)

for max_S in max_S_list:
    print(max_S)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S_list = []
S_count_list = []

for n in range(N):
    s = input()

    if s in S_list:
        index_s = S_list.index(s)
        S_count_list[index_s] += 1
    
    else:
        S_list.append(s)
        S_count_list.append(1)

max_list = [i for i, v in enumerate(S_count_list) if v == max(S_count_list)]

max_S_list = []
for i in max_list:
    max_S_list.append(S_list[i])

max_S_list.sort()

for ans_s in max_S_list:
    print(ans_s)





Fixed submission:
N = int(input())
S_dic = {}

for n in range(N):
    S = input()

    if S in S_dic:
        S_dic[S] += 1
    else:
        S_dic[S] = 1


# 最大のvalueを取得する
max_value = max(S_dic.values())

max_S_list = [k for k, v in S_dic.items() if v == max_value]
max_S_list = sorted(max_S_list)

for max_S in max_S_list:
    print(max_S)
Buggy python submission (verdict: Runtime Error):
X = int(input())

is_prime_num_list = [True] * 100000
is_prime_num_list[0] = False
is_prime_num_list[1] = False

for i in range(2, X + 1):
    if is_prime_num_list[i] == True:

        # iの倍数番目をFalseにする
        for j in range(2 * i, 100000, i):
            is_prime_num_list[j] = False


prime_num_list = [i for i, j in enumerate(is_prime_num_list) if i >= X and j == True]

print(min(prime_num_list))


'''
if is_prime_num_list[X] == True:
    print(X)
    exit()
'''

'''
while True:
    X += 1
    is_target = True
    for i in prime_num_list:
        if X % i == 0:
            is_target = False
            break

    if is_target:
        print(X)
        exit()
'''
    
    




        







Fixed submission:
X = int(input())

is_prime_num_list = [True] * 100005
is_prime_num_list[0] = False
is_prime_num_list[1] = False

for i in range(2, X + 1):
    if is_prime_num_list[i] == True:

        # iの倍数番目をFalseにする
        for j in range(2 * i, 100005, i):
            is_prime_num_list[j] = False

prime_num_list = [i for i, j in enumerate(is_prime_num_list) if i >= X and j == True]

print(min(prime_num_list))


'''
if is_prime_num_list[X] == True:
    print(X)
    exit()
'''

'''
while True:
    X += 1
    is_target = True
    for i in prime_num_list:
        if X % i == 0:
            is_target = False
            break

    if is_target:
        print(X)
        exit()
'''
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

min_total = 100000000000000
for a in range(1, N // 2 + 2):
    b = N / a
    if b.is_integer():
        tmp_a_and_b = a + b
        if tmp_a_and_b < min_total:
            min_total = tmp_a_and_b

print(int(min_total - 2))

            

Fixed submission:
# https://atcoder.jp/contests/abc144/tasks/abc144_c

import math

N = int(input())

mi = -1

for i in range(1, int(math.sqrt(N)) + 1):
    a = i
    if N % a != 0:
        continue

    b = N // a
    count = a + b - 2
    
    if mi <= -1 or mi > count:
        mi = count

print(mi)
Buggy python submission (verdict: Time Limit Exceeded):
# https://atcoder.jp/contests/abc143/tasks/abc143_d

N = int(input())
L_list = list(map(int, input().split()))
L_list = sorted(L_list)
count = 0

for a in range(N-2):
    for b in range(a + 1, N-1):
        c_min = max(L_list[a] - L_list[b], L_list[b] - L_list[a], L_list[b])
        
        c_max = L_list[a] + L_list[b]
        count_c = len([i for i in L_list if ((c_min < i) and (i < c_max))])
        count += count_c

print(count)

Fixed submission:
# https://atcoder.jp/contests/abc143/tasks/abc143_d

import bisect

N = int(input())
L_list = list(map(int, input().split()))
L_list = sorted(L_list)
count = 0

for a in range(N-2):
    for b in range(a + 1, N-1):
        c_min = L_list[b + 1]
        c_max = L_list[a] + L_list[b]
        c_max_idx = bisect.bisect_left(L_list, c_max)
        c_count = c_max_idx - (b + 1)
        count += c_count

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
# https://atcoder.jp/contests/abc143/tasks/abc143_d

N = int(input())
L_list = list(map(int, input().split()))

count = 0

for i in range(N-2):
    for j in range(i + 1, N-1):
        for k in range(j + 1, N):
            if ((L_list[i] < L_list[j]+L_list[k]) 
            and (L_list[j] < L_list[k]+L_list[i]) 
            and (L_list[k] < L_list[i]+L_list[j])):
                count += 1

print(count)

Fixed submission:
# https://atcoder.jp/contests/abc143/tasks/abc143_d

import bisect

N = int(input())
L_list = list(map(int, input().split()))
L_list = sorted(L_list)
count = 0

for a in range(N-2):
    for b in range(a + 1, N-1):
        c_min = L_list[b + 1]
        c_max = L_list[a] + L_list[b]
        c_max_idx = bisect.bisect_left(L_list, c_max)
        c_count = c_max_idx - (b + 1)
        count += c_count

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
# https://atcoder.jp/contests/abc142/tasks/abc142_c

N = int(input())
A_list = list(map(int, input().split()))

ans = str(A_list.index(1) + 1)
for i in range(2, N + 1):
    tmp = str(A_list.index(i) + 1)
    ans = ' '.join([ans, tmp])

print(ans)

Fixed submission:
# https://atcoder.jp/contests/abc142/tasks/abc142_c

N = int(input())
A_list = list(map(int, input().split()))

# ans = str(A_list.index(1) + 1)
# for i in range(2, N + 1):
#     tmp = str(A_list.index(i) + 1)
#     ans = ' '.join([ans, tmp])



ans_list = [0] * N

for i in range(N):
    ans_list[A_list[i] - 1] = i + 1

# リストを空白区切りで出力
print(*ans_list)

Buggy python submission (verdict: Time Limit Exceeded):
# https://atcoder.jp/contests/abc142/tasks/abc142_c

N = int(input())
A_list = list(map(int, input().split()))

ans_list = []

for i in range(1, N + 1):
    ans_list.append(str(A_list.index(i) + 1))

print(' '.join(ans_list))

Fixed submission:
# https://atcoder.jp/contests/abc142/tasks/abc142_c

N = int(input())
A_list = list(map(int, input().split()))

# ans = str(A_list.index(1) + 1)
# for i in range(2, N + 1):
#     tmp = str(A_list.index(i) + 1)
#     ans = ' '.join([ans, tmp])



ans_list = [0] * N

for i in range(N):
    ans_list[A_list[i] - 1] = i + 1

# リストを空白区切りで出力
print(*ans_list)
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc137/tasks/abc137_c

import math

N = int(input())

s_dic = {}
s_set = set()

for i in range(N):
    s = input()

    s = ''.join(sorted(s))

    if s in s_set:
        s_dic[s] += 1

    else:
        s_set.add(s)
        s_dic[s] = 1


result = 0

for val in s_dic.values():

    if val > 1:
        result += int(math.factorial(val) /2)

print(result)

Fixed submission:
# https://atcoder.jp/contests/abc137/tasks/abc137_c

import math

N = int(input())

s_dic = {}
s_set = set()

for i in range(N):
    s = input()

    s = ''.join(sorted(s))

    if s in s_set:
        s_dic[s] += 1

    else:
        s_set.add(s)
        s_dic[s] = 1


result = 0

for val in s_dic.values():

    if val > 1:
        result += int((val * (val - 1)) / 2)

print(result)
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc131/tasks/abc131_c


import math


A, B, C, D = map(int, input().split())

C_ = (B // C) - ((A - 1) // C)

D_ = (B // D) - ((A - 1) // D)

# 最大公約数
CD = math.gcd(C, D)

# 最小公倍数
CD = (C * D) / CD

CD_ = (B // CD) - ((A - 1) // CD)

total_num = B - (A - 1)

ans = total_num - C_ - D_ + CD_

print(int(ans))

Fixed submission:
# https://atcoder.jp/contests/abc131/tasks/abc131_c

from fractions import gcd


A, B, C, D = map(int, input().split())

C_ = B // C
D_ = B // D

C_a = (A-1) // C
D_a = (A-1) // D

# 最小公倍数
CD = (C * D) // gcd(C, D)    # C*D / (最大公約数)

CD_ = (B // CD)
CD_a = ((A-1) // CD)

ans = B - (A-1) - (C_ - C_a) - (D_ - D_a) + (CD_ - CD_a)

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

cake_price = 4
donut_price = 7

max_cake = N // cake_price
max_donut = N // donut_price

isJustN = False
if max_cake * cake_price == N or max_donut * donut_price == N:
    isJustN = True
else:
    for c in range(1, max_cake + 1):
        for d in range(1, max_donut + 1):
            total_price = cake_price * c + donut_price * d
            if total_price == N:
                isJustN = True
                break

Result = ''
Result = 'Yes' if isJustN == True else Result = 'No'
print(Result)


Fixed submission:

N = int(input())

cake_price = 4
donut_price = 7

max_cake = N // cake_price
max_donut = N // donut_price

isJustN = False
if max_cake * cake_price == N or max_donut * donut_price == N:
    isJustN = True
else:
    for c in range(1, max_cake + 1):
        for d in range(1, max_donut + 1):
            total_price = cake_price * c + donut_price * d
            if total_price == N:
                isJustN = True
                break

Result = ''
if isJustN == True:
    Result = 'Yes'
else:
    Result = 'No'
print(Result)
Buggy python submission (verdict: Runtime Error):
N = input()
A = input()


A_list = []
for i in range(0, len(A), 1):
    A_list.append(int(A[i: i + 1]))


A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)

Fixed submission:
N = input()
A_list = input().split()

A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)

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

A_list = [A[i: i + 1] for i in range(0, len(A), 1)]

A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)

Fixed submission:
N = input()
A_list = input().split()

A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)

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

A_list = [A[i: i + 1] for i in range(0, len(A), 1)]

A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)

Fixed submission:
N = input()
A_list = input().split()

A_list_int = list(map(int, A_list))

max = max(A_list_int)
min = min(A_list_int)

print(max - min)
Buggy python submission (verdict: Runtime Error):
    # https://atcoder.jp/contests/abc085/tasks/abc085_c

    # N枚、Y円
    N, Y = map(int, input().split())

    for i in range(N):
        for j in range(N):
            
            z = N - (i + j)

            if z < 0:
                continue

            if i*1000 + j*5000 + z*10000 == Y:
                print(i, j, z)
                exit()

    print(-1, -1, -1)






    # ダメな例
    # def dfs(total, c_1000, c_5000, c_10000, count_bill):

    #     if count_bill == N and total == Y:
    #         print(c_1000, c_5000, c_10000)
    #         exit()

    #     elif count_bill == N:
    #         return


    #     dfs(total + 1000, c_1000+1, c_5000, c_10000, count_bill+1)

    #     dfs(total + 5000, c_1000, c_5000+1, c_10000, count_bill+1)

    #     dfs(total + 10000, c_1000, c_5000, c_10000+1, count_bill+1)

    # dfs(0, 0, 0, 0, 0)
    # print(-1, -1, -1)

Fixed submission:
# https://atcoder.jp/contests/abc085/tasks/abc085_c

# N枚、Y円
N, Y = map(int, input().split())

for i in range(N + 1):
    for j in range(N + 1):
        
        z = N - (i + j)

        if z < 0:
            continue

        total = i*1000 + j*5000 + z*10000
        
        if total == Y:
            print(z, j, i)
            exit()

print('-1 -1 -1')
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc081/tasks/abc081_b

N = int(input())
A = list(map(int, input().split()))


# リスト内の要素に奇数が含まれているかどうかを判断する
# 戻り値：Boolean
def judge_hasOdd(A):
    hasOdd = False
    for a in A:
        if a % 2 == 0:
            continue
        else:
            hasOdd = True
            break
    return hasOdd


# リスト内の全要素を２で割る
# リスト内に奇数が現れるまで上記操作を繰り返す
count = 0
while True:
    if judge_hasOdd(A) == False:
        A = list(map(lambda x: x/2, A))
        count += 1
    else:
        break

print(count)



Fixed submission:
input = input()
total = 0
for element in input:
    total += int(element)

print(total)
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc081/tasks/abc081_b

N = int(input())
A = list(map(int, input().split()))


# リスト内の要素に奇数が含まれているかどうかを判断する
# 戻り値：Boolean
def judge_hasOdd(A):
    hasOdd = False
    for a in A:
        if a % 2 == 0:
            continue
        else:
            hasOdd = True
            break
    return hasOdd


# リスト内の全要素を２で割る
# リスト内に奇数が現れるまで上記操作を繰り返す
count = 0
while True:
    if judge_hasOdd(A) == False:
        A = list(map(lambda x: x/2, A))
        count += 1
            break
    else:
        break

print(count)



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


def judge_hasOdd(A):
    hasOdd = False
    for a in A:
        if a % 2 == 0:
            continue
        else:
            hasOdd = True
            break
    return hasOdd


count = 0
while True:
    if judge_hasOdd(A) == False:
        A = list(map(lambda x: x/2, A))
        count += 1
    else:
        break

print(count)