Search
Duplicate
๐Ÿฅˆ

๋ฌธ์ž์—ด

์ฃผ์ฐจ
๋ฌธ์ œ๋ฒˆํ˜ธ
1120
์–ธ์–ด
Python
ํ‹ฐ์–ด
์‹ค๋ฒ„
์œ ํ˜•
๋ฌธ์ž์—ด
nj_Blog
O
nj_์ƒํƒœ
์™„๋ฃŒ
์ดํ•ด๋„
ํ’€์ด
์‚ฌ๋žŒ
์ดํ•ด๋„ 2
13 more properties

๋ฌธ์ œ๋งํฌ

https://www.acmicpc.net/problem/1120

์ฝ”๋“œ ์ œ์ถœ ๊ธฐ๋ก (๋ฉ”๋ชจ๋ฆฌ ๋ฐ ์‹œ๊ฐ„)

์ œ์ถœ ๋‚ ์งœ

@4/24/2021

๋ฉ”๋ชจ๋ฆฌ

121220 KB

์‹œ๊ฐ„

108 ms

Code

str1, str2 = map(str, input().split()) MIN = 100 def function(i): global str1, str2 answer = 0 for x in range(len(str1)): if str1[x] != str2[i+x]: answer += 1 return answer for i in range(len(str2) - len(str1) + 1): MIN = min(MIN, function(i)) print(MIN)
Python
๋ณต์‚ฌ