Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n, m, x = map(int,input().split())
l = [list(map(int,input().split())) for i in range(n)]

def generate_n_bit(n):
    bins= []
    for i in range(2**n):
        bins.append(list(str(format(i,'b').zfill(n))))
    
    return bins

min_price = 10**9
bins = generate_n_bit(10)
bins = bins[1:]

for bin in bins:
    a = [0 for k in range(m)]
    price = 0
    for i in range(n):
        if bin[i] == '1':
            for j in range(m):
                a[j] += l[i][j+1]
            
            price += l[i][0]
    
   
    
    if min(a) >= x:
        min_price = min(price, min_price)
        

if min_price == 10**9:
    print(-1)
    exit()
    
print(min_price)


Fixed submission:
n, m, x = map(int,input().split())
l = [list(map(int,input().split())) for i in range(n)]

def generate_n_bit(n):
    bins= []
    for i in range(2**n):
        bins.append(list(str(format(i,'b').zfill(n))))
    
    return bins

min_price = 10**9
bins = generate_n_bit(n)
bins = bins[1:]

for bin in bins:
    a = [0 for k in range(m)]
    price = 0
    for i in range(n):
        if bin[i] == '1':
            for j in range(m):
                a[j] += l[i][j+1]
            
            price += l[i][0]
    
   
    
    if min(a) >= x:
        min_price = min(price, min_price)
        

if min_price == 10**9:
    print(-1)
    exit()
    
print(min_price)

Buggy python submission (verdict: Runtime Error):
n, m, x = map(int,input().split())
l = [list(map(int,input().split())) for i in range(n)]

def generate_n_bit(n):
    bins= []
    for i in range(2**n):
        bins.append(list(str(format(i,'b').zfill(n))))
    
    return bins

min_price = 10**9
bins = generate_n_bit(10)
del bins[0]

for bin in bins:
    a = [0 for k in range(m)]
    price = 0
    for i in range(n):
        if bin[i] == '1':
            for j in range(m):
                a[j] += l[i][j+1]
            
            price += l[i][0]
    
   
    
    if min(a) >= x:
        min_price = min(price, min_price)
        print(min_price)


print(min_price)



Fixed submission:
n, m, x = map(int,input().split())
l = [list(map(int,input().split())) for i in range(n)]

def generate_n_bit(n):
    bins= []
    for i in range(2**n):
        bins.append(list(str(format(i,'b').zfill(n))))
    
    return bins

min_price = 10**9
bins = generate_n_bit(n)
bins = bins[1:]

for bin in bins:
    a = [0 for k in range(m)]
    price = 0
    for i in range(n):
        if bin[i] == '1':
            for j in range(m):
                a[j] += l[i][j+1]
            
            price += l[i][0]
    
   
    
    if min(a) >= x:
        min_price = min(price, min_price)
        

if min_price == 10**9:
    print(-1)
    exit()
    
print(min_price)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
import fractions

ans = 0
for i in range(1,n+1):
    for j in range(i, n+1):
        for k in range(j, n+1):
            if i == j and j == k:
                ans += i
            
            elif len({i,j,k}) == 2:
                ans += fractions.gcd(fractions.gcd(i,j),k)*3
            
            elif len({i,j,k}) == 3:
                ans += fractions.gcd(fractions.gcd(i,j),k)*6
        
print(ans)

Fixed submission:
n = int(input())
import math

ans = 0
for i in range(1,n+1):
    for j in range(i, n+1):
        for k in range(j, n+1):
            if i == j and j == k:
                ans += i
            
            elif len({i,j,k}) == 2:
                ans += math.gcd(math.gcd(i,j),k)*3
            
            elif len({i,j,k}) == 3:
                ans += math.gcd(math.gcd(i,j),k)*6
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
import fractions

sum = 0
for i in range(1,k+1):
    for j in range(1,k+1):
        for m in range(1,k+1,):
           sum += (fractions.gcd(fractions.gcd(i,j),m))
print(sum)

Fixed submission:
n = int(input())
import math

ans = 0
for i in range(1,n+1):
    for j in range(i, n+1):
        for k in range(j, n+1):
            if i == j and j == k:
                ans += i
            
            elif len({i,j,k}) == 2:
                ans += math.gcd(math.gcd(i,j),k)*3
            
            elif len({i,j,k}) == 3:
                ans += math.gcd(math.gcd(i,j),k)*6
        
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int,input().split())

ball_n = [0, 0]

while sum(ball_n) != n:
    for _ in range(a):
        ball_n[0] += 1
        if sum(ball_n) == n:
            break
    
    if sum(ball_n) == n:
        break
    
    for _ in range(b):
        ball_n[1] += 1
        if sum(ball_n) == n:
            break

print(ball_n[0])

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

ans = n // (a+b) * a
r = n % (a+b)

ans += min(a, r)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
c = int(input())

quary = [list(map(str, input().split())) for i in range(c)]

for q in quary:
    if q[0] == '1':
        s = s[::-1]
    
    else:
        if q[1] == '1':
            s = q[2] + s
        
        else:
            s = s + q[2]

print(s)

Fixed submission:
from collections import deque

s = input()
c = int(input())

que = deque(s)

flipped = False
for i in range(c):
    query = input()
    
    if query[0] == '1':
        flipped = not flipped
    
    else:
        t, f, c = query.split()
        if (f == '1') ^ flipped:
            que.appendleft(c)
        
        else:
            que.append(c)



ans = ''.join(que)

if flipped:
    ans = ans[::-1]

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

for i in range(10**n):
    s = str(i)
    c = 0
    for i in range(m):
        if n >= 2:
            if sc[i] == [1,0]:
                print(-1)
                sys.exit()
            
        if s[sc[i][0]-1] == str(sc[i][1]):
            c += 1
    
    if c == m:
        print(s)
        sys.exit()

print(-1)

Fixed submission:
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

for i in range(10**n):
    s = str(i)
    if len(s) != n:
        continue
    c = 0
    for i in range(m):
        if n >= 2:
            if sc[i] == [1,0]:
                print(-1)
                sys.exit()
            
        if s[sc[i][0]-1] == str(sc[i][1]):
            c += 1
    
    if c == m:
        print(s)
        sys.exit()

print(-1)

Buggy python submission (verdict: Runtime Error):
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

l = [0 for i in range(n)]
set_sc = [[] for i in range(n)]

for i in range(m):
    set_sc[sc[i][0]-1].append(sc[i][1])

for i in range(len(set_sc)):
    if len(set(set_sc[i])) > 1:
        print(-1)
        sys.exit()

if set_sc[0][0] == 0:
    print(-1)
    sys.exit()

for i in range(len(set_sc)):
    if len(set_sc[i]) == 0:
        continue
    l[i] = set_sc[i][0]

l = list(map(str,l))
print(''.join(l))

Fixed submission:
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

for i in range(10**n):
    s = str(i)
    if len(s) != n:
        continue
    c = 0
    for i in range(m):
        if n >= 2:
            if sc[i] == [1,0]:
                print(-1)
                sys.exit()
            
        if s[sc[i][0]-1] == str(sc[i][1]):
            c += 1
    
    if c == m:
        print(s)
        sys.exit()

print(-1)

Buggy python submission (verdict: Runtime Error):
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

l = [0 for i in range(n)]
set_sc = [[] for i in range(n)]

for i in range(m):
    set_sc[sc[i][0]-1].append(sc[i][1])

for i in range(m):
    if len(set(set_sc[i])) > 1:
        print(-1)
        sys.exit()

if set_sc[0][0] == 0:
    print(-1)
    sys.exit()

for i in range(n):
    if len(set_sc[i]) == 0:
        continue
    l[i] = set_sc[i][0]

l = list(map(str,l))
print(''.join(l))

Fixed submission:
import sys
n,m = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]

for i in range(10**n):
    s = str(i)
    if len(s) != n:
        continue
    c = 0
    for i in range(m):
        if n >= 2:
            if sc[i] == [1,0]:
                print(-1)
                sys.exit()
            
        if s[sc[i][0]-1] == str(sc[i][1]):
            c += 1
    
    if c == m:
        print(s)
        sys.exit()

print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce

def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom
    
n,a,b = map(int,input().split())

res = pow(2,n,10**9+7)
res -= 1


res -= combinations_count(n,a)
res %= 10**9+7

res -= combinations_count(n ,b)
res %= 10**9+7

print(res)

Fixed submission:
n,a,b = map(int,input().split())
mod = 10**9+7

def C(n, r, mod):
    x=y=1
    for i in range(r):
        x *= n; y *= r
        x %= mod; y %= mod
        n -= 1; r -= 1
    return x * pow(y, mod - 2, mod) % mod


res = pow(2,n,mod) - 1


comb_a = C(n,a,mod)
comb_b = C(n,b,mod)

print((res-(comb_a+comb_b))%mod)

Buggy python submission (verdict: Runtime Error):
from scipy.misc import comb

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

res = pow(2,n,10**9+7)
res -= 1


res -= comb(n, a, exact=True)
res %= 10**9+7

res -= comb(n, b, exact=True)
res %= 10**9+7

print(res)

Fixed submission:
n,a,b = map(int,input().split())
mod = 10**9+7

def C(n, r, mod):
    x=y=1
    for i in range(r):
        x *= n; y *= r
        x %= mod; y %= mod
        n -= 1; r -= 1
    return x * pow(y, mod - 2, mod) % mod


res = pow(2,n,mod) - 1


comb_a = C(n,a,mod)
comb_b = C(n,b,mod)

print((res-(comb_a+comb_b))%mod)

Buggy python submission (verdict: Runtime Error):
from scipy.special import comb

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

res = pow(2,n,10**9+7)
res -= 1


res -= comb(n, a, exact=True)
res %= 10**9+7

res -= comb(n, b, exact=True)
res %= 10**9+7

print(res)

Fixed submission:
n,a,b = map(int,input().split())
mod = 10**9+7

def C(n, r, mod):
    x=y=1
    for i in range(r):
        x *= n; y *= r
        x %= mod; y %= mod
        n -= 1; r -= 1
    return x * pow(y, mod - 2, mod) % mod


res = pow(2,n,mod) - 1


comb_a = C(n,a,mod)
comb_b = C(n,b,mod)

print((res-(comb_a+comb_b))%mod)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
dic = {}

for word in range(n):
    word = input()
    if not word in dic:
        dic[word] = 1
    
    else:
        dic[word] += 1

ans = [kv[0] for kv in dic.items() if kv[1] == max(dic.values())]

ans.sort()
for i in ans:
    print(i)

Fixed submission:
n = int(input())
dic = {}

for word in range(n):
    word = input()
    if not word in dic:
        dic[word] = 1
    else:
        dic[word] += 1
max_v = max(dic.values())
ans = [kv[0] for kv in dic.items() if kv[1] == max_v]

ans.sort()
for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
dic = {}

for word in range(n):
    word = input()
    if not word in dic:
        dic[word] = 1
    
    else:
        dic[word] += 1

ans = [k for k, v in dic.items() if v == max(dic.values())]
ans.sort()
for i in ans:
    print(i)

Fixed submission:
n = int(input())
dic = {}

for word in range(n):
    word = input()
    if not word in dic:
        dic[word] = 1
    else:
        dic[word] += 1
max_v = max(dic.values())
ans = [kv[0] for kv in dic.items() if kv[1] == max_v]

ans.sort()
for i in ans:
    print(i)
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = list(map(int,input().split()))

l = [0]*200001

for num in nums:
    l[num] += 1

if max(l) == 1:
    print('YES')

else:
    print('NO')

Fixed submission:
n = int(input())
nums = list(map(int,input().split()))
c = 0
nums = sorted(nums)

for i in range(n-1):
    if nums[i] == nums[i+1]:
        c += 1
        break
    
if c != 0:
    print('NO')

else:
    print('YES')

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

l = [0]*200001

for num in nums:
    l[num] += 1

if max(nums) == 1:
    print('YES')

else:
    print('NO')

Fixed submission:
n = int(input())
nums = list(map(int,input().split()))
c = 0
nums = sorted(nums)

for i in range(n-1):
    if nums[i] == nums[i+1]:
        c += 1
        break
    
if c != 0:
    print('NO')

else:
    print('YES')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
ans = 0

for i in range(n):
    if p[i] <= min(p[:i+1]):
        ans += 1

print(ans)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
ans = 0
min = p[0]

for i in range(n):
    if p[i] <= min:
        ans += 1
        min = p[i]

print(ans)
Buggy python submission (verdict: Runtime Error):
for i in range(0,n-2):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                c += 1
        
print(c)

Fixed submission:
n = int(input())
s = input()

c = 0

for i in range(0,n-2):
    if s[i] == 'A':
        if s[i+1] == 'B':
            if s[i+2] == 'C':
                c += 1
        
print(c)
Buggy python submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())

print((a*b) // math.gcd(a,b))

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

print((a*b) // fractions.gcd(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import collections

n = int(input())
s = input()

comb = list(itertools.combinations(list(s), 3))

print(len(collections.Counter(comb)))


Fixed submission:
import itertools
import collections

n = int(input())
s = input()

password_l = [str(i).zfill(3) for i in range(1000)]

c = 0
for password in password_l:
    idx = 0
    ok = 0
    while idx != n:
        if s[idx] == password[ok]:
            ok += 1
        
        if ok == 3:
            c += 1
            break
        
        idx += 1

print(c)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

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

combinations = list(itertools.combinations(range(n),3))

c = 0

for i in combinations:
    if l[i[0]] < l[i[1]] + l[i[2]] and l[i[1]] < l[i[0]] + l[i[2]] and l[i[2]] < l[i[1]] + l[i[0]]:
        c += 1
    
print(c)


Fixed submission:
import itertools
import bisect

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

l = sorted(l)

combinations = list(itertools.combinations(range(n),2))

cnt = 0

for i in combinations:
    a_b = l[i[0]] + l[i[1]]
    max_ab = max(i[0], i[1])
    c = bisect.bisect_left(l,a_b)
    
    cnt += (c - (max_ab+1))


print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

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

combinations = list(itertools.combinations(range(n),3))

c = 0

for i in combinations:
    if l[i[0]] < l[i[1]] + l[i[2]] and l[i[1]] < l[i[0]] + l[i[2]] and l[i[2]] < l[i[1]] + l[i[0]]:
        c += 1
    
print(c)


Fixed submission:
import itertools
import bisect

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

l = sorted(l)

combinations = list(itertools.combinations(range(n),2))

cnt = 0

for i in combinations:
    a_b = l[i[0]] + l[i[1]]
    max_ab = max(i[0], i[1])
    c = bisect.bisect_left(l,a_b)
    
    cnt += (c - (max_ab+1))


print(cnt)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

order = []


for i in range(1,n+1):
    order.append(a.index(i)+1)
    

for i in range(n):
    order[i] = str(order[i])

print(' '.join(order))

Fixed submission:
n = int(input())

c = 0
for i in range(1,n+1):
    if i % 2 != 0:
        c += 1

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


for i in range(1,n+1):
    print(str(a.index(i)+1), end=' ')
    

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

ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1

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

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

order = []


for i in range(1,n+1):
    order.append(str(a.index(i)+1))
    


print(' '.join(order))

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

ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1

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

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

order = []


for i in range(1,n+1):
    order.append(a.index(i)+1)
    

for i in range(n):
    order[i] = str(order[i])

print(' '.join(order))

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

ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1

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

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

order = []


for i in range(1,n+1):
    order.append(a.index(i)+1)
    

print(' '.join([str(i) for i in order]))

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

ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1

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

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

order = []


for i in range(1,n+1):
    order.append(a.index(i)+1)
    

print(' '.join([str(i) for i in order]))

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

ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1

print(' '.join(map(str,ans)))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
b = []


for i in range(n):
    cnt = 0
    baisuu = [j for j in range(1,n+1) if j % (n-i) == 0]
    for j in baisuu:
            cnt += a[j-1]
    b.append(cnt%2)

c = 0
for i in b:
    if i != 0:
        c += 1

print(c)
str_b = []
for i in reversed(b):
    if i != 0:
        str_b.append(str(i))
print(' '.join(str_b))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [0]*n

for i in range(n)[::-1]:
    cnt = sum(b[i::i+1])
    if (cnt %2) != a[i]:
        b[i] = 1
    

print(sum(b))

for i, j in enumerate(b):
    if j == 1:
        print(i+1)

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


for i in range(n):
    cnt = 0
    for j in range(n):
        if (j+1) % (n-i) == 0:
            cnt += a[j]
    b.append(cnt%2)

c = 0
for i in b:
    if i != 0:
        c += 1

print(c)
str_b = []
for i in reversed(b):
    if i != 0:
        str_b.append(str(i))
print(' '.join(str_b))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [0]*n

for i in range(n)[::-1]:
    cnt = sum(b[i::i+1])
    if (cnt %2) != a[i]:
        b[i] = 1
    

print(sum(b))

for i, j in enumerate(b):
    if j == 1:
        print(i+1)
Buggy python submission (verdict: Runtime Error):
n,x = map(int,input().split())

l = list(map(int,input().split()))

dis = 0
i = 0

while True:
    dis += l[i]
    
    if dis > x:
        break
    i += 1

print(i+1)

    
    

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

l = list(map(int,input().split()))

cnt = 1
dis = 0

for i in l:
    dis += i
    if dis > x:
        break
    cnt += 1

print(cnt)

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

l = list(map(int,input().split()))

dis = 0
i = 0

while dis <= x:
    dis += l[i]
    i += 1

print(i)
    
    

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

l = list(map(int,input().split()))

cnt = 1
dis = 0

for i in l:
    dis += i
    if dis > x:
        break
    cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
h,w = map(int,input().split())
field = [list(input()) for i in range(h)]

max_light = 0
for i in range(h):
    for j in range(w):
        n_light = 1
        if field[i][j] == '#':
            continue
        
        c = 1
        while True:
            if (j+c > w-1) or (j+c < 0) or (field[i][j+c] == '#'):
                break
            
            else:
                n_light += 1
                c += 1
        
        c = 1
        while True:
            if (j-c > w-1) or (j-c < 0) or (field[i][j-c] == '#'):
                break
            
            else:
                n_light += 1
                c += 1
        
        c = 1
        while True:
            if (i+c > h-1) or (i+c < 0) or (field[i+c][j] == '#'):
                break
            
            else:
                n_light += 1
                c += 1
        
        c = 1
        while True:
            if (i-c > h-1) or (i-c < 0) or (field[i-c][j] == '#'):
                break
            
            else:
                n_light += 1
                c += 1
        
        max_light = max(max_light,n_light)


print(max_light)

Fixed submission:
h,w = map(int,input().split())
field = [list(input()) for i in range(h)]

l = [[0]*w for i in range(h)]
r = [[0]*w for i in range(h)] 
u = [[0]*w for i in range(h)] 
d = [[0]*w for i in range(h)] 

for i in range(h):
    for j in range(w):
        if field[i][j] == "#":
            l[i][j] = 0
        
        elif j == 0:
            l[i][j] = 1
        
        else:
            l[i][j] = l[i][j-1] + 1

for i in range(h):
    for j in range(w)[::-1]:
        if field[i][j] == "#":
            r[i][j] = 0
        
        elif j == w-1:
            r[i][j] = 1
        
        else:
            r[i][j] = r[i][j+1] + 1

for j in range(w):
    for i in range(h):
        if field[i][j] == "#":
            d[i][j] = 0
        
        elif i == 0:
            d[i][j] = 1
        
        else:
            d[i][j] = d[i-1][j] + 1
    
for j in range(w):
    for i in range(h)[::-1]:
        if field[i][j] == "#":
            u[i][j] = 0
        
        elif i == h-1:
            u[i][j] = 1
        
        else:
            u[i][j] = u[i+1][j] + 1
        
max_light = 0       
for i in range(h):
    for j in range(w):
        n_light = l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3
        
        max_light = max(max_light,n_light)

print(max_light)
Buggy python submission (verdict: Time Limit Exceeded):
s =list(input())

c = 0


while True:
    if len(s) <= 1:
        break
    
    for i in range(len(s)-1):
        if len(s) <= 1:
            break
        
        k = 0
            
        if ((s[i]+s[i+1]) == '01') or ((s[i]+s[i+1]) == '10'):
            s.pop(i)
            s.pop(i)
        
            c += 2
            k += 1
            break
        
    if k == 0:
        break
    

print(c)

Fixed submission:
s =list(input())


m = min(s.count('0'),s.count('1'))

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

x = b // a

if x <= c:
	print(x)

else:
	print(c)


Fixed submission:
S = list(map(int,input().split('/')))

if S[1] > 4 :
  print('TBD')
else:
  print('Heisei')

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

x = b // a

if x <= c:
	print(x)

else:
	print(c)

Fixed submission:
S = list(map(int,input().split('/')))

if S[1] > 4 :
  print('TBD')
else:
  print('Heisei')
Buggy python submission (verdict: Runtime Error):
N = input().split()

l = list(map(int,input().split()))

c = 0

for i in l:
	if i >= (sum(l) - i):
		c += 1
    
if c == 0:
  print('Yes')
else:
  print('No')


Fixed submission:
T,X = map(int,input().split())

ans = float(T/X)

print(ans)