[Baekjoon] 1120 문자열 python

sorzzzzy·2021년 8월 4일
0

Baekjoon Algorithm

목록 보기
21/46
post-thumbnail

🏷 문제


💡 코드

a,b = input().split()
a = list(a)
b = list(b)
res_list  = []
cnt = 0
for i in range (len(b)-len(a)+1):
    cnt = 0
    for j in range(len(a)):
        if a[j] != b[j+i]:
            cnt += 1
    res_list.append(cnt)
    
print(min(res_list))

🔑

profile
Backend Developer

0개의 댓글