Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
p = list(map(int,input().split()))
p = list(map(lambda x:(x+1)/2,p))
from itertools import accumulate
A =  [0] + list(accumulate(p))
M = 0
index = 0
for x in range(N - K +  1):
    M = max(M,sum(p[x: x  + K]))
print(M)


Fixed submission:
N, K = map(int,input().split())
p = list(map(int,input().split()))
p = list(map(lambda x:(x+1)/2,p))
from itertools import accumulate
A =  [0] + list(accumulate(p))
M = 0
index = 0
for x in range(N - K +  1):
    M = max(M,A[x + K] - A[x])
print(M)

Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
p = sorted(list(map(int,input().split())))[::-1]
p = print(sum(map(lambda x:(x+1)/2,p)[:K]))


Fixed submission:
N, K = map(int,input().split())
p = list(map(int,input().split()))
p = list(map(lambda x:(x+1)/2,p))
from itertools import accumulate
A =  [0] + list(accumulate(p))
M = 0
index = 0
for x in range(N - K +  1):
    M = max(M,A[x + K] - A[x])
print(M)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
ans =0 
for i in range(0,N):
    for j in range(0,i):
        if(P[i]>P[j]):
            break
    else: 
        ans += 1
print(ans)


Fixed submission:
N = int(input())
P = list(map(int,input().split()))
ans = 0 
m = 10 ** 6
for i in range(N):
    if m > P[i]:
        ans += 1
    m = min(m,P[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

typedef struct {
    int ipt; int num;
} tpl;

int asc(const void *a, const void *b) {
    return ((*(tpl *)a)).ipt - ((*(tpl *)b)).ipt;
}

int main(void){
    int N;
    scanf("%d", &N);
    int a[100000 + 10];
    tpl array[100000 + 10];
    for (int i = 0; i < N; i++) {
        scanf("%d", &array[i].ipt);
        array[i].num = i + 1;
    }
    qsort(array,N,sizeof (tpl), asc);
    for (int i = 0; i < N; i++) {
        printf("%d ",array[i].num);
    }

}


Fixed submission:
N = int(input())
L = list(map(int,input().split()))
a = []
for i in range(len(L)):
    t = (L[i],i)
    a.append(t)
a = sorted(a)
for i in a:
    print(i[1]+1,end = ' ')
Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = [1]

g = gcd(A, B)
i = 2
while g > 1:
    if g % i == 0:
        if L[-1] != i:
            L.append(i)
        g /= i
    else:
        i += 1
print(len(L))


Fixed submission:
A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = [1]

g = gcd(A, B)
g_copy = gcd(A, B)
i = 2
while g > 1:
    if i > g_copy ** (1/2) :
        if g != 1:
            L.append(i)
        break
    if g % i == 0:
        if L[-1] != i:
            L.append(i)
        g /= i
    else:
        i += 1
print(len(L))

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = []

g = gcd(A, B)
i = 2
while g > 1:
    if g % i == 0:
        L.append(i)
        g /= i
    else:
        i += 1
def counter(array):
    from collections import Counter
    return list(Counter(array).most_common())
c = counter(L)
print(len(c) + 1)



Fixed submission:
A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = [1]

g = gcd(A, B)
g_copy = gcd(A, B)
i = 2
while g > 1:
    if i > g_copy ** (1/2) :
        if g != 1:
            L.append(i)
        break
    if g % i == 0:
        if L[-1] != i:
            L.append(i)
        g /= i
    else:
        i += 1
print(len(L))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
S = input()
tmp = S[0]
cnt = 0
L = []
for x in S:
    if tmp == x:
        cnt += 1
    else:
        L.append(cnt)
        cnt = 1
        tmp = x
L.append(cnt)
tmp = 0
for _ in range(b):
    for _ in range(2):
        tmp += L.pop(0)
tmp += L.pop(0)
L = [tmp] + L
print(sum(L) - len(L))


Fixed submission:
a,b = map(int,input().split())
S = input()
tmp = S[0]
cnt = 0
L = []
for x in S:
    if tmp == x:
        cnt += 1
    else:
        L.append(cnt)
        cnt = 1
        tmp = x
L.append(cnt)
tmp = 0
for _ in range(b):
    for _ in range(2):
        try:
            tmp += L.pop(0)
        except:
            print(a- 1)
            quit()
try:
    tmp += L.pop(0)
except:
    print(a-1)
    quit()
L = [tmp] + L
print(sum(L) - len(L))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = []
from bisect import bisect_left
for _ in range(N):
    u = int(input())
    index = bisect_left(L,u)
    if index == 0:
        L = [u] + L
    else:
        L[index - 1] = u
print(len(L))


Fixed submission:
N = int(input())
L = []
from bisect import bisect_right
for _ in range(N):
    u = -int(input())
    index = bisect_right(L,u)
#    print(index)
    if index == len(L):
        L.append(u)
    else:
        L[index ] = u
print(len(L))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = []
from bisect import bisect_left
for _ in range(N):
    u = int(input())
    index = bisect_left(L,u)
    if index == 0:
        L = [u] + L
    else:
        L[index - 1] = u
print(len(L))


Fixed submission:
N = int(input())
L = []
from bisect import bisect_right
for _ in range(N):
    u = -int(input())
    index = bisect_right(L,u)
#    print(index)
    if index == len(L):
        L.append(u)
    else:
        L[index ] = u
print(len(L))
Buggy python submission (verdict: Runtime Error):
N,A,B,C,D = map(int,input().split())
S = input()
M = max(C,D)
C = S
S = S[A-1:M]

for i in range(len(S) - 1):
    if S[i] == S[i+1] and S[i+1] == '#':
        print("No")
        quit()
S = C[B:M]
for i in range(len(S) - 2):
    if S[i] == S[i+1] and S[i+1]== S[i+2]  and S[i+2] == '.':
        print("Yes")
        quit()
if C <= B:
    print("Yes")
elif  C < D:
    print("Yes")
elif D <= C:
    print("No")


Fixed submission:
N,A,B,C,D = map(int,input().split())
S = input()
M = max(C,D)
A -= 1
B -= 1
C -= 1
D -= 1


for i in range(A,max(C,D)):
    if S[i] == S[i+1] and S[i+1] == '#':
        print("No")
        quit()
if  C < D:
    print("Yes")
elif D <= C:
    for i in range(B-1,D):
        if S[i] == S[i+1] and S[i+1]== S[i+2]  and S[i+2] == '.':
            print("Yes")
            quit()
    print("No")
Buggy python submission (verdict: Runtime Error):
N , K = map(int,input().split())
S = input()
L = []
flag = int(S[0])
for x in S:
    L.append(x)
cnt = 1
C = []
for i in range(len(L)):
    try:
        if L[i] == L[i+1]:
            cnt += 1
        else:
            C.append(cnt)
            cnt = 1
    except:
        pass
C.append(cnt)
ans = 0
from itertools import accumulate
accumulated =  [0]+list(accumulate(C))
ans = 0
A = 0
for i in range(len(C)):
    try:
        if (flag + i) % 2 == 0:
            K = min(K,len(C)//A+1)
            ans = accumulated[i+2*K] - accumulated[i]
        else:
            K = min(K,len(C)//2)
            ans = accumulated[i+2*K+1] - accumulated[i]
        A = max(ans,A)
    except:
        pass
print(A)
　

Fixed submission:
N , K = map(int,input().split())
S = input()
L = []
flag = int(S[0])
for x in S:
    L.append(x)
cnt = 1
C = []
for i in range(len(L)):
    try:
        if L[i] == L[i+1]:
            cnt += 1
        else:
            C.append(cnt)
            cnt = 1
    except:
        pass
C.append(cnt)
ans = 0
from itertools import accumulate
accumulated =  [0]+list(accumulate(C))
ans = 0
A = 0
if flag == 0:
    if len(C) % 2 == 0:
        k = min(K,len(C)//2)
    else:
        k = min(K,len(C)//2+1)
else:
    k = min(K,len(C)//2)
for i in range(len(C)):
    try:
        if (flag + i) % 2 == 0:
            A =max(A, accumulated[i+2*k-1] - accumulated[i])
            ans = accumulated[i+2*k] - accumulated[i]
        else:
            A =max(A, accumulated[i+2*k-1] - accumulated[i])
            A =max(A, accumulated[i+2*k] - accumulated[i])
            ans = accumulated[i+2*k+1] - accumulated[i]
        A = max(ans,A)
    except:
        pass
print(A)
Buggy python submission (verdict: Time Limit Exceeded):

def cal_comb(n,r):
    ret = 1
    for i in range(1,n+1):
        ret *= i
    for i in range(1,n-r+1):
        ret //= i
    for i in range(1,r+1):
        ret //= i
    return ret


N,M = map(int,input().split())
L = list(map(int,input().split()))

from itertools import accumulate
accumulated =  [0]+list(accumulate(L))
accumulated = map(lambda x:x%M,accumulated)
def counter(array):
    from collections import Counter
    return list(Counter(array).most_common())
c = counter(accumulated)
ans = 0
for x in c:
    ans += cal_comb(x[1],2)

print(ans)



Fixed submission:



N,M = map(int,input().split())
L = list(map(int,input().split()))

from itertools import accumulate
accumulated =  [0]+list(accumulate(L))
accumulated = map(lambda x:x%M,accumulated)
def counter(array):
    from collections import Counter
    return list(Counter(array).most_common())
c = counter(accumulated)
ans = 0
for x in c:
    ans += x[1] * (x[1]-1) //2

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
cnt = 0
L = list(map(int,input().split()))
while True:
    try: 
        if L[0] <L[1]>L[2] or L[0] > L[1] <L[2]:
            a0=L.pop(0)
            a1=L.pop(0)
            cnt += 1

        else:
            L.pop(0)
    except:
        break
print(1+cnt)


Fixed submission:
N = int(input())
cnt = 0
tmp = ''
M = list(map(int,input().split()))
L = []
for x in M:
    if x == tmp:
        pass
    else:
        L.append(x)
    tmp = x
    

    
while True:
    try: 
        if L[0] <L[1]>L[2] or L[0] > L[1] <L[2]:
            a0=L.pop(0)
            a1=L.pop(0)
            cnt += 1
        else:
            L.pop(0)
    except:
        break
#    print(L)
print(1+cnt)

Buggy python submission (verdict: Runtime Error):
N = int(input())
cnt = 0
L = list(map(int,input()..split()))
for i in range(N-2):
  if (L[i] > L[i+1] < L[i+2]) or (L[i] < L[i+1] > L[i+2]):
    cnt += 1
print(cnt)

Fixed submission:
N = int(input())
cnt = 0
tmp = ''
M = list(map(int,input().split()))
L = []
for x in M:
    if x == tmp:
        pass
    else:
        L.append(x)
    tmp = x
    

    
while True:
    try: 
        if L[0] <L[1]>L[2] or L[0] > L[1] <L[2]:
            a0=L.pop(0)
            a1=L.pop(0)
            cnt += 1
        else:
            L.pop(0)
    except:
        break
#    print(L)
print(1+cnt)
Buggy python submission (verdict: Time Limit Exceeded):
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

n,m = map(int,input().split())

X = sorted(list(map(int,input().split())))
Y = sorted(list(map(int,input().split())))
ans = 0
for i in range(n - 1):
    for j in range(m - 1):
        S = (X[i + 1] - X[i]) * (Y[j + 1] - Y[j])
        num = (i + 1) * (n - (i + 1)) * (j + 1) * (m - (j + 1))
        S *= num
        S %= 10 ** 9 + 7
        ans += S
        ans %= 10 ** 9 + 7
print(ans)




Fixed submission:
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

n,m = map(int,input().split())

X = [0] + sorted(list(map(int,input().split())))
Y = [0] + sorted(list(map(int,input().split())))
sum1 = 0
sum2 = 0
MOD = 10 ** 9 + 7
for i in range(1, n + 1):
    sum1 += ((i - 1)*X[i] - (n - i)*X[i]) % MOD
for i in range(1, m + 1):
    sum2 += ((i - 1)*Y[i] - (m - i)*Y[i])%MOD
print(sum1 * sum2 % MOD)
Buggy python submission (verdict: Runtime Error):
# D - Integer Cards
# https://atcoder.jp/contests/abc127/tasks/abc127_d

import sys

n, m = list(map(int, sys.stdin.readline().split()))
cards = list(map(int, sys.stdin.readline().split()))
cards.sort()

set = [list(map(int, sys.stdin.readline().split())) for _ in range(m)]

# combinations.sort(key = lambda x: x[1], reverse = True)
combinations = []
for b, c in set:
    combinations.extend([c] * b)

combinations.sort(reverse = True)

for i in range(len(combinations)):
    if i > len(cards) or combinations[i] <= cards[i]:
        break
    else:
        cards[i] = combinations[i]

print(sum(cards))

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

if a <= 5:
    print(0)
elif a <= 12:
    print(b//2)
else:
    print(b)
Buggy python submission (verdict: Runtime Error):
# B - Great Ocean View
# https://atcoder.jp/contests/abc124/tasks/abc124_b


n = int(input())
points = list(map(int, input().split()))
# points = [1,2,3,4,5]

# if len(points) < 3:
#     first, second = points[0], points[1]
need_height = max(points[0], points[1])
ans = 1
for i in range(1, len(points)):
    pre_spot = points[i-1]
    if need_height <= points[i] and pre_spot <= points[i]:
        ans += 1

        
print(ans)

Fixed submission:
# B - Great Ocean View
# https://atcoder.jp/contests/abc124/tasks/abc124_b


n = int(input())
points = list(map(int, input().split()))
ans = 1
need_height = points[0]


for i in range(1, n):
    current = points[i]
    if need_height <= current:
        ans += 1
        need_height = current


print(ans)
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc123/tasks/abc123_b

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


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 0

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)

Fixed submission:
# https://atcoder.jp/contests/abc123/tasks/abc123_b

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


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 0

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
if last:
    orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)

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

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


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 130

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)

Fixed submission:
# https://atcoder.jp/contests/abc123/tasks/abc123_b

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


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 0

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
if last:
    orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)
Buggy python submission (verdict: Runtime Error):
n = int(input())
f = 4
s = 7

for i in range(n):
    for n in range(n):
        if s + f == n:
            ans = 1
            break

if ans:
    print("Yes")
else:
    print("No")


Fixed submission:
n = int(input())
if n <= 3:
    print("No")
elif n == 5:
    print("No")
elif n == 6:
    print("No")
elif n == 9:
    print("No")
elif n == 10:
    print("No")
elif n == 13:
    print("No")
elif n == 17:
    print("No")    
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
nums = list(map(int, input().split()))


# ある数の誤差１で収まる個数を計算する
# 最も多い物を出力
# 一度全て展開する
# 数列の最初の数について全て走査して、つぎはその次の数、、、と繰り返していく
# どこにカウンターを設置するのがよいか
# 外側にゼロでカウンターを配置して最も内側で外にあるカウンターよりも数値が大きければ入れ替える

ans = 0
for i in nums:
    cnt = 0
    for n in nums:
        if n in range(i-1, i+2):
            cnt += 1
    if ans < cnt:
        ans = cnt

print(ans)


Fixed submission:
from collections import OrderedDict

n = input()
nums = list(map(int, input().split()))

number_hash = OrderedDict()

for i in sorted(nums):
    if i not in number_hash:
        number_hash[i] = 1
    else:
        number_hash[i] += 1

ans = 0
for i in number_hash:
    cnt = 0
    # 今とある定数をハッシュから引き出した
    # ハッシュの中から今取り出した数プラマイ１の数字が多い物を見つける
    i_d = i - 1
    i_u = i + 1
    if i_d in number_hash:
        cnt += number_hash[i_d]
    if i_u in number_hash:
        cnt += number_hash[i_u]
    cnt += number_hash[i]

    if ans < cnt:
        ans = cnt

print(ans)
Buggy python submission (verdict: Runtime Error):
s, t = input().split()
a, b = map(int, input().split())
h = input()
if s == h and a >= 1:
  a -= 1
if t == h and b >= 1:
  b -= 1
print a, b

Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
h = input()
if s == h and a >= 1:
    a -= 1
if t == h and b >= 1:
    b -= 1
print(a, b)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input.split())

if a < b:	print(str(a+'0') * b )
else:	print(str(b+'0') * a )

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

if a < b:	print(str(a) * b )
else:	print(str(b) * a )
Buggy python submission (verdict: Runtime Error):
print(S)

Fixed submission:
s, t = map(str,input().split())
a, b = map(int,input().split())
u = input()
 
if s == u:
	print(a-1, b)
else:
	print(a, b-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(int,input().split())

if N != len(set(A)):
    print('YES')
else:
    print('NO')


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

# N=6
# A = [4,1,3,1,6,2]


if N == len(set(A)):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
nb = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      (x - 500*i - 100*j - 50*k) == 0:
      nb += 1
print(nb)
      

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
nb = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if (x - 500*i - 100*j - 50*k) == 0:
        nb += 1
print(nb)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, inpit().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")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, imput().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")
Buggy python submission (verdict: Runtime Error):
n = int(input())

hoge = [0 for i in range(0,N)]
for i in range(0,N):
    hoge[i] = int(input())
    

number_set = set(hoge)
print(len(number_set))

Fixed submission:
n = int(input())
 
hoge = [0 for i in range(0,n)]
for i in range(0,n):
    hoge[i] = int(input())
    
 
number_set = set(hoge)
print(len(number_set))
Buggy python submission (verdict: Runtime Error):
x, a, b,  = map(int, input().split())

sum_number = []

for i in range(x+1):
  if a <= sum(map(int, str(i))) <= b:
    sum_number += [i]
    
priny(sum(sum_number))
  
  


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

sum_number = []

for i in range(x+1):
  if a <= sum(map(int, str(i))) <= b:
    sum_number += [i]
    
print(sum(sum_number))

Buggy python submission (verdict: Runtime Error):
a, b, x = map(int, input().split())

sum_number = []

for i in range(x+1):
  if a< sum(map(int, str(i))) < b:
    sum_number += [i]
    
priny(sum(sum_number))
  
  

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

sum_number = []

for i in range(x+1):
  if a <= sum(map(int, str(i))) <= b:
    sum_number += [i]
    
print(sum(sum_number))
Buggy python submission (verdict: Runtime Error):
s = list(input())
numbers = 0
for i in s:
  if s[i] ==  "1":
    numbers += 1

print(numbers)


Fixed submission:
s = list(input())
numbers = 0
for i in s:
  if i ==  "1":
    numbers += 1

print(numbers)

Buggy python submission (verdict: Runtime Error):
s = list(input())
numbers = 0
for i in s:
  if s[i] == 1:
    numbers +=1

print(numbers)

Fixed submission:
s = list(input())
numbers = 0
for i in s:
  if i ==  "1":
    numbers += 1

print(numbers)
Buggy python submission (verdict: Runtime Error):
li = map(int, input().split())
number = 0
even_or_odd = 1
def check_number(list):
  for i in list:
    if i % 2 == 0:
      continue
    else:
      even_or_odd *= 0
      
def cut_in_two(list):
  for i in list:
    i /= 2

while True:
  if even_or_odd == 1:
    check_number(li)
    cut_in_two(li)
    number += 1
  else:
    print(number)
    break
  


Fixed submission:
def how_many(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    ans += 1
  return ans
 
n = int(input())
li = map(int, input().split())

ans = min(map(how_many, li))

print(ans)
Buggy python submission (verdict: Runtime Error):
S, T = map(input().split())
A, B = map(int, input().split())
U = input()
if S=U:
  print("{} {}".format(S-1,T))
else:
  print("{} {}".format(S,T-1)


Fixed submission:

S, T = input().split()
A, B = map(int, input().split())
U = input()
if S==U:
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(A,B-1))

Buggy python submission (verdict: Runtime Error):
aa

Fixed submission:

S, T = input().split()
A, B = map(int, input().split())
U = input()
if S==U:
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(A,B-1))
Buggy python submission (verdict: Runtime Error):
S = input()
print("x"*len(words))

Fixed submission:
S = input()
print("x"*len(S))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split();print(a*b//2)

Fixed submission:
a,b,c=map(int,input().split());print(a*b//2)

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input());print(a*b//2)

Fixed submission:
a,b,c=map(int,input().split());print(a*b//2)