题解 | 小红的双生串
小红的双生串
https://www.nowcoder.com/practice/099d6681234d4e3e95c0e0ade31929da
s = input()
s1 = s[:len(s) // 2]
s2 = s[len(s)//2:]
d1 = 0
d2 = 0
y1 = ""
y2 = ""
for i in s1:
if i not in y1:
d1 = max(d1,s1.count(i))
y1 += i
for i in s2:
if i not in y2:
d2 = max(d2,s2.count(i))
y2 += i
print(len(s1)-d1 + len(s2)-d2)
