Buggy python submission (verdict: Runtime Error):
import numpy as np
S = input()
T = input()

if len(S)==0:
    print(0)
else:
    tmp = np.zeros(len(T))

    i=0
    flg=True

    while flg:
        for j in range(i, len(T)):
            if T[i:j+1] in S:
                tmp[i] = j+1-i
        i = max(i + int(tmp[i]),i+1)
        if i >= len(T)-1:
            flg=False

    tmp = np.array(tmp, dtype=int)
    i = np.argmax(tmp)
    j = tmp[i]
    s = S.find(T[i:i+j])
    if s - i >= 0 and s - i + len(T) <= len(S):
        print(len(T)-int(np.max(tmp)))
    else:
        l=0
        for k in range(len(T)):
            if S[s+k] == T[k]:
                l+=1
        print(len(T)-l)

Fixed submission:
S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
S = input()
T = input()

tmp = np.zeros(len(T))

i=0
flg=True

while flg:
    for j in range(i, len(T)):
        if T[i:j+1] in S:
            tmp[i] = j+1-i
    i = max(i + int(tmp[i]),i+1)
    if i >= len(T)-1:
        flg=False

tmp = np.array(tmp, dtype=int)
i = np.argmax(tmp)
j = tmp[i]
s = S.find(T[i:i+j])
if s - i >= 0 and s - i + len(T) <= len(S):
    print(len(T)-int(np.max(tmp)))
else:
    l=0
    for k in range(len(T)):
        if S[s+k] == T[k]:
            l+=1
    print(len(T)-l)

Fixed submission:
S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
S = input()
T = input()

tmp = np.zeros(len(T))

i=0
flg=True

while flg:
    for j in range(i, len(T)):
        print(i,j)
        print(T[i:j+1])
        print(T[i:j+1] in S)
        if T[i:j+1] in S:
            tmp[i] = j+1-i
    i = max(i + int(tmp[i]),i+1)
    if i >= len(T)-1:
        flg=False

print(len(T)-int(np.max(tmp)))

Fixed submission:
S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)

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

tmp = np.zeros(len(T))

i=0
flg=True

while flg:
    for j in range(i, len(T)):
        if T[i:j+1] in S:
            tmp[i] = j
    i = i + int(tmp[i])
    if i >= len(T)-1:
        flg=False

print(int(np.max(tmp)))

Fixed submission:
S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)

Buggy python submission (verdict: Runtime Error):
#inp = list(map(int, input().split()))
S = input()
T = input()

tmp = []*len(T)

i=0
while i < len(T):
  for j in range(i, len(T)-i):
    if T[i:i+j+1] in S:
      tmp[i] = j
  i = tmp[i]
      
print(max(tmp))

Fixed submission:
S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)