Problem:


Score : 200 points

Problem Statement

Takahashi loves palindromes. Non-palindromic strings are unacceptable to him. Each time he hugs a string, he can change one of its characters to any character of his choice.

Given is a string S. Find the minimum number of hugs needed to make S palindromic.

Constraints

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

Print the minimum number of hugs needed to make S palindromic.

Sample Input 1

redcoder

Sample Output 1

1

For example, we can change the fourth character to o and get a palindrome redooder.

Sample Input 2

vvvvvv

Sample Output 2

0

We might need no hugs at all.

Sample Input 3

abcdabc

Sample Output 3

2



Sample input:
redcoder


Sample output:
1

Submission status: Accepted

Solution code:
s = input()

check_i = len(s)//2
count = 0

for i in range(check_i):
  if s[i]!=s[-(i+1)]:
    count += 1

print(count)

Submission status: Accepted

Solution code:
x = input()
ct =0
for name, name1 in zip(x, x[::-1]):
    if(name !=name1):
        ct = ct+1


print(int(ct/2))

Submission status: Accepted

Solution code:
s = input()
re_s = reversed(s)
count = 0
for si,re_si in zip(s,re_s):
    if si != re_si:
        count += 1
if count == 0:
    print(0)
else:
    print(count//2)

Submission status: Accepted

Solution code:
s=list(input())
slen=len(s)
cnt=0
for i in range(slen//2):
    if(s[i]!=s[slen-i-1]):
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
S = input()

start = 0
last = len(S)-1
count = 0

while (start < last):
  if(S[start] != S[last]):
    count += 1
  start += 1
  last -= 1
print(count)

Submission status: Accepted

Solution code:
s = input()

n = len(s)

c = 0

for i in range(n // 2):
    if s[i] != s[n - 1 - i]:
        c += 1

print(c)

Submission status: Accepted

Solution code:
S = input()
S1 = S[::-1]
cnt = 0
for i in range(len(S)):
    if S[i] != S1[i]:
        cnt += 1
print(cnt//2)

Submission status: Accepted

Solution code:
S=str(input())
count=0
for i in range(len(S)//2):
  if S[i]!=S[-1-i]:
    count+=1
print(count)

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(len(s) // 2):
    if s[i] != s[-1 - i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = input()
SS = S[::-1]
X = len(S)//2
#print(S)
#print(SS)
cnt = 0
for i in range(X):
    if S[i] != SS[i]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
S = input().strip()
R = S[::-1]

ans = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input().strip()
l = len(s)
ans = 0
for idx in range(l//2):
  if s[idx] != s[l - idx -1]:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
count = 0
for i in range(len(s) // 2):
    count += 1 if s[i] != s[-1-i] else 0
print(count)

Submission status: Accepted

Solution code:
S = list(input())
n = int(len(S))

count = 0
for i in range(int(n/2)):
    if S[i]!=S[n-1-i]:
        count += 1
    

print(count)

Submission status: Accepted

Solution code:
frase = input()
tam = len(frase)//2

cont=0
for i in range(tam):
    if (frase[i] != frase[-i-1]):
        cont+=1

print(cont)

Submission status: Accepted

Solution code:
s = input()
l = len(s) // 2
n = 0
for i, j in zip(s[:l + 1], s[-1:l - 1:-1]):
    if i != j:
        n += 1
print(n)

Submission status: Accepted

Solution code:
s = input()
n = int(len(s)/2)

c = 0
for i in range(n):
    if s[i] != s[-i-1]:
        c += 1

print(c)

Submission status: Accepted

Solution code:
s = input()
if len(s) % 2 == 0:
    l = s[:len(s)//2]
    r = s[len(s)//2:len(s)][::-1]
else:
    l = s[:len(s)//2]
    r = s[len(s)//2+1:len(s)][::-1]
cnt = 0
for li, ri in zip(l, r):
    if li != ri:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
S=input()
L=len(S)

N=L//2

cnt=0

for i in range(N):
    if S[i]!=S[-1*(i+1)]:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
import math
s = input()
count = 0

if len(s) % 2 == 0:
    x = len(s) // 2
else:
    x = math.floor(len(s) / 2)

for i in range(x):
    if s[i] != s[len(s)-1-i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
ls = len(s) // 2
s1 = s[:ls]
s2 = s[ls:]
s2 = s2[::-1]
ans = 0
for i in range(len(s1)):
    if s1[i] != s2[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
n = len(s)
if n % 2 == 0:
    h = n // 2
else:
    h = n // 2 + 1
for i in range(h):
    if s[i] != s[n-i-1]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(len(s) // 2):
    if s[i] != s[-i - 1]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
first = s[:int(n/2)]
latter = s[int(n/2):]
latter = latter[::-1]

diff = 0
for i in range(int(n/2)):
    diff += 1 if (first[i] != latter[i]) else 0
print(diff)

Submission status: Accepted

Solution code:
s = input()
c = 0
i, j = 0, len(s) - 1
while i < len(s)//2:
    if s[i] == s[j]:
        i += 1
        j -= 1
    else:
        c += 1
        i += 1
        j -= 1
print(c)

Submission status: Accepted

Solution code:
S = str(input())

ans = 0
for i in range(int(len(S) / 2)):
    if S[i] != S[-1-i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input()
ans = 0
for i in range(len(S) // 2):
    #print(S[i],S[-i-1])
    if S[i] != S[-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
count = 0
for i in range(len(s)//2):
    if s[i] != s[len(s)-1-i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S=input()
l = 0
r = len(S) - 1
ans = 0
while l < r:
    if S[l] != S[r]:
        ans += 1
    l += 1
    r -= 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    s_list = list(input())

    ans = 0
    len_s2 = len(s_list) // 2
    for i in range(len_s2):
        if s_list[i] != s_list[-(i+1)]:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

res = 0
for i in range(len(s) // 2):
  
  if(s[i] != s[-i-1]): res+= 1
print(res)

Submission status: Accepted

Solution code:
S=str(input())
result=0

for i in range(len(S)//2):
	if S[i]!=S[len(S)-i-1]:
		result+=1
print(result)

Submission status: Accepted

Solution code:
s = input()
c = 0
for i in range(len(s)//2):
    if s[i] != s[-i-1]:
        c += 1
print(c)

Submission status: Accepted

Solution code:
S = input()
n = len(S)
_n = n//2 if n%2==0 else (n-1)//2

count = 0

for i in range(_n):
  if (S[i]!=S[n-i-1]):
    count+=1

print(count)

Submission status: Accepted

Solution code:
S=list(input())
Ans=0
for i in range(len(S)//2):
    if S[i]!=S[-i-1]:
        Ans+=1
print(Ans)

Submission status: Accepted

Solution code:
s = input()

half = int(len(s) / 2)
wrong = 0
for i in range(half):
    if s[i] != s[-(i+1)]:
        wrong += 1

print(wrong)

Submission status: Accepted

Solution code:
s = input()
ans = 0
for i in range(len(s) // 2):
    if s[i] != s[len(s) - 1 - i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input()

c = 0

for i in range(len(S)//2):
    if S[i] != S[-i-1]:
        c+=1

print(c)

Submission status: Accepted

Solution code:
s = list(input())
s_rev = list(reversed(s))

count = 0
for i in range(len(s)):
    if s[i] != s_rev[i]:
        count += 1
print(int(count/2))

Submission status: Accepted

Solution code:
s = input()
i = 0
ib = len(s) - 1
ans = 0

while i < ib:
    if s[i] != s[ib]:
        ans += 1
    i += 1
    ib -= 1

print(ans)

Submission status: Accepted

Solution code:
s = input()
l = sum(x != y for x,y in zip(s,s[::-1]))
print((l+1)//2)

Submission status: Accepted

Solution code:
S=input()
SL=S[::-1]
ANS=0
for i in range(len(S)):
  if SL[i] != S[i]:
    ANS += 1
print(ANS//2)

Submission status: Accepted

Solution code:
#t=int(input())
for i in range(1):
    #arr=list(map(int,input().split()))
    arr=input()
    res=0
    for j in range(len(arr)//2):
        if(arr[j]!=arr[len(arr)-j-1]):
            res+=1
    print(res)

Submission status: Accepted

Solution code:
s=input()
n=len(s)//2
cnt=0
for i in range(n):
    cnt+=1 if s[i]!=s[-i-1] else 0
print(cnt)

Submission status: Accepted

Solution code:
s = input()
ans = 0

  
for i in range(round(len(s)/2)):
    if s[i]!=s[-(i+1)]:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
s=input()
l=len(s)
x=0
for i in range(l//2):
  if s[i]!=s[l-i-1]:
    x+=1
print(x)

Submission status: Accepted

Solution code:
S = list(str(input()))
re_S = S[::-1]

ans = 0

for s,r in zip(S,re_S):
    if s != r:
        ans += 0.5

print(int(ans))

Submission status: Accepted

Solution code:
s = input()

if len(s)%2 == 0:
    count = 0
    for i in range(len(s)//2):
        
        if s[i] != s[-i-1]:
            count += 1
    print(count)

else:
    count = 0
    for i in range(len(s)//2):
        
        if s[i] != s[-i-1]:
            count += 1
    print(count)

Submission status: Accepted

Solution code:
s = input()
l = len(s)
c = 0
if l%2 == 0:
    for i in range(0,l//2):
        if s[i] != s[l-1-i]:
            c = c+1
else:
    for i in range(0,l//2):
        if s[i] != s[l-1-i]:
            c = c+1
print(c)

Submission status: Accepted

Solution code:
# coding: utf-8
s = input()
n = len(s)

result = 0
for i in range(int(n/2)):
    if s[i] != s[n-1-i]:
        result += 1

print(result)

Submission status: Accepted

Solution code:
s = input()
end = len(s)//2 + 1
ans = 0
for i in range(1, end):
    if s[i-1] == s[i*(-1)]:
        continue
    else:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys


def main():
    # input = sys.stdin.readline
    S = list(input())
    rev = list(reversed(S))

    count = 0

    for i in range(len(S)):
        if S[i] != rev[i]:
            count += 1

    print(count//2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()

l = len(a)-1
i=0
t = 0

while l-2*i >= 1:
    if not a[i] == a[l-i]:
        t += 1
    i += 1
print(t)

Submission status: Accepted

Solution code:
S = input()
ans = 0
for i in range(len(S)//2):
    if(S[i]!=S[len(S)-i-1]):
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

s = input()[:-1]

cnt = 0
for i in range(len(s)//2):
    if s[i] != s[-i-1]:
         cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
half = int(len(s)/2)
out = 0
for i in range(half):
  if s[i] != s[-i-1]:
    out += 1
print(out)

Submission status: Accepted

Solution code:
S = input()
RS = S[::-1]
c = 0
for i in range(len(S)//2):
    if S[i] != RS[i]:
        c += 1
print(c)

Submission status: Accepted

Solution code:
s=input()
l=len(s)
c=0
for i in range(l//2):
    if s[i]!=s[l-1-i]:
        c+=1
print(c)

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    S = input()
    length = len(S) // 2
    left = S[:length]
    right = S[-length:][::-1]
    count = 0
    for l, r in zip(left, right):
        if l != r:
            count += 1
    print(count)

Submission status: Accepted

Solution code:
S = input()
SS = S[::-1]
ans = 0
for i in range(len(S)//2):
    if S[i] != SS[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input()
invert = S[::-1]

from math import floor

counter  = 0
for i in range(floor(len(S) / 2)):
	if S[i] != invert[i]:
		counter += 1

print(counter)

Submission status: Accepted

Solution code:
s = input()
lens = len(s)
cnt = 0
for i, j in zip(s[:lens//2], s[::-1][:lens//2]):
  if i != j:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(len(s) // 2):
	if s[i] != s[-(i + 1)]:
		cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()

ans = 0

for i in range(len(s)//2):
    if s[i] != s[len(s)-1-i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s=input()

hug_count=0
for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
        hug_count+=1

print(hug_count)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines

# rstrip().decode('utf-8')
# map(int,input().split())


def main():
	s=input().rstrip().decode('utf-8')
	n=len(s)//2
	
	a=s[:n]
	bb=s[::-1]
	b=bb[:n]
	
	ans=0
	
	for i in range(n):
		if a[i]!=b[i]:
			ans+=1
	print(ans)
	
	
	
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
s = list(input())
ans = 0

for i in range(len(s)):
  if s[i] != s[len(s)-i-1]:
    s[i] = s[len(s)-i-1]
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
S = input()
cnt = 0

for i in range(len(S)//2):
    if S[i] != S[len(S) - i -1]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
f = len(s) // 2
c = 0

for i in range(f):
    if s[i] != s[len(s) - (i + 1)]:
        c += 1

print(c)

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
s=input().rstrip()
n=len(s)
m=n//2
ans=0
for i in range(m):
    if not s[i]==s[n-1-i]:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
S = input()
N = len(S)

ans = 0
for i in range((N + 1) // 2):
    if S[i] != S[N - i - 1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np


def main():
    S = input()
    ret = 0
    for i in range(len(S) // 2):
        if S[i] != S[len(S)-i-1]:
            ret += 1

    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

total = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-1-i]:
        total += 1

print(total)

Submission status: Accepted

Solution code:
s = input()
ans = 0
for i in range(len(s)//2):
    if s[i] != s[-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def count(s1, s2):
    c = 0
    for i in range(len(s1)):
        if not s1[i] == s2[i]:
            c += 1
    return c


s = input()

mid = len(s) // 2
if len(s) % 2 == 0:
    print(count(s[:mid], s[mid:][::-1]))
else:
    print(count(s[:mid], s[mid+1:][::-1]))

Submission status: Accepted

Solution code:
S=str(input())
answer=0
for i in range(len(S)//2):
  if S[i]!=S[-i-1]:
    answer +=1
print(answer)

Submission status: Accepted

Solution code:
S=input()
S_len=len(S)//2
ans=0
for i in range(1,S_len+1):
    if S[i-1]!=S[-i]:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
a = input()
n = int(len(a)/2)
b = 0
for i in range(n):
    if a[i] != a[-i-1]:
        b += 1
print(b)

Submission status: Accepted

Solution code:
s = input()
l = len(s)
cnt = 0
for i in range(int(l/2)):
  if s[i] != s[-1*(i+1)]:
    cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
S = input()
cnt = len(S)//2
ans = 0
for i in range(cnt):
    if S[i] !=  S[-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import copy
S = input()
cS = copy.deepcopy(S)
cnt = 0
for i in range(len(S)):
    if S[i] != cS[-1-i]:
        cnt += 1
print(cnt//2)

Submission status: Accepted

Solution code:
S = list(input())
ans = 0
if len(S) % 2 == 0:
  for i in range(int(len(S)/2)):
    if S[i] != S[len(S)-1-i]:
      ans += 1
else:
  for i in range(int((len(S)-1)/2)):
    if S[i] != S[len(S)-1-i]:
      ans += 1

print(ans)

Submission status: Accepted

Solution code:
s=input()
ans=0
for i in range(len(s)):
    j=len(s)-1-i
    if(i >= len(s)-1-i):
        break
    elif(s[i] != s[j]):
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
S = input()

if len(S) % 2 == 0:
    front = S[:len(S)//2]
    back = S[len(S)//2:][::-1]

else:
    front = S[:len(S)//2]
    back = S[len(S)//2+1:][::-1]

ans = 0
for i, j in zip(front, back):
    if i != j:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#ABC-B
s=input()
count=0
if len(s)%2==0:
    for i in range(len(s)//2):
        if s[i]!=s[len(s)-i-1]:
            count+=1
else:
    for i in range((len(s)-1)//2):
        if s[i]!=s[len(s)-i-1]:
            count+=1
print(count)

Submission status: Accepted

Solution code:
S = input()
n = len(S)
i = n // 2
ans = 0
for j in range(0, i):
    if S[j] != S[-(j + 1)]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()

l = len(s)
ans = 0

for i in range(l//2):
	if s[i] != s[-i-1]:
		ans += 1

print(ans)

Submission status: Accepted

Solution code:
S = input()
ans = 0
l = len(S)
for i in range(l // 2):
    if S[i] != S[l - 1 - i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = list(str(input()))
L = len(S)
count = 0

for i in range(L // 2):
    if S[i] != S[L - 1 - i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = input()

l =len(S)
ans =0
for i in range(l//2):
    if S[i] != S[-i-1]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s = input()
r = 0
while len(s) > 1:
  if s[0] == s[-1]:
    pass
  else:
    r = r + 1
  
  s = s[1:]
  s = s[:-1]
  
print(r)

Submission status: Accepted

Solution code:
S = list(input())
if len(S) % 2 == 0:
    S1 = S[:len(S)//2]
    S2 = S[len(S)//2:]
else:
    S1 = S[:len(S)//2]
    S2 = S[(len(S)//2 + 1):]

S2 = S2[::-1]
ans = 0
for i in range(len(S1)):
    if S1[i] != S2[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
moji=input()

List = list(moji)

length = len(List) // 2
cnt = 0

for i in range(length):
  if List[i] != List[len(List)-1-i]:
    cnt = cnt + 1
print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

s = input()
s = list(s)
s_r = list(reversed(s))
n = len(s)
c = 0
for i in range(n // 2):
    if s[i] != s_r[i]:
        c += 1
ans = c
print(ans)

Submission status: Accepted

Solution code:
S = input()

len_s = len(S)
cnt = 0
for i in range(len_s//2):
    if S[i]!=S[len_s-i-1]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
count = 0


for i in range(len(s)//2):
  if s[i] != s[-1*(i+1)]:
    count += 1

print(count)

Submission status: Accepted

Solution code:
S = input()
count = 0

for i in range(len(S) // 2):
    if S[i] != S[-1 - i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
mid = (len(s) + 1) // 2
cnt = 0
for i in range(mid):
    if s[i] != s[-i - 1]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = list(input())[ :-1]
T = S[: : -1]
res = 0
for i in range(len(S)):
  if S[i] != T[i]:
    res += 1
    S[i] = T[i]
    T[-1 - i] = S[i]
  #print(S, T)
print(res)

Submission status: Accepted

Solution code:
s = list(input())
counter = 0

for i in range(0,len(s),1):
  if s[i] != s[len(s)-i-1]:
    counter += 1
print(int(counter/2))

Submission status: Accepted

Solution code:
s = input()
ans = 0

for i in range(len(s)//2):
  ans += not s[i]==s[-1-i]
print(ans)

Submission status: Accepted

Solution code:
S=input()
l=len(S)
cnt=0

for i in range(l//2):
    if S[i] != S[-(i+1)]:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
s=input()
count=0
for i in range((len(s)+1)//2):
	if s[i]!=s[len(s)-1-i]:
		count+=1
print(count)

Submission status: Accepted

Solution code:
s=input()
n=len(s)//2
cnt=0
for i in range(n):
    #print(s[i],s[-i-1])
    if s[i]!=s[-i-1]:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
s=input()
c=0
for i in range(int(len(s)/2)):
  if s[i] != s[len(s)-1-i]:
    c=c+1
print(c)

Submission status: Accepted

Solution code:
from sys import stdin

S = stdin.readline().rstrip()
c = len(S) // 2
ans = 0

for i in range(c):
    if S[i] != S[len(S) - i - 1]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s=input()
a=0
for i in range(len(s)//2):
  if s[i]!=s[-1-i]:
    a+=1
print(a)

Submission status: Accepted

Solution code:
def main():
    string = input()
    length = len(string)
    last_index = length - 1
    count = 0
    for i in range(length // 2):
        if string[i] != string[last_index - i]:
            count += 1
    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(len(s) // 2):
  if s[i] != s[-i-1]:
    count += 1
    
    
print(count)

Submission status: Accepted

Solution code:
s = str(input())
sl = [str(i) for i in s]
cnt = 0

for i in range(len(sl)//2):
    if sl[i] == sl[len(sl)-1-i]:
        pass
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
S = list(input())
left = S[0:len(S)//2]
right = S[len(S)//2:]
right.reverse()
cnt = 0
for l,r in zip(left,right):
  if l != r:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()

ans = 0
for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
        ans+= 1

print(ans)

Submission status: Accepted

Solution code:
s=input()
answer=0
for i in range(len(s)//2):
    if s[i]!=s[-(i+1)]:
        answer+=1
print(answer)

Submission status: Accepted

Solution code:
s = input()

cnt = 0

for i in range(len(s)//2):
    if s[i] == s[-(i+1)]:
        continue
    else:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
l = len(s)
if l%2 == 1:
    b = s[:l//2]
    a = s[l//2+1:][::-1]
else:
    b = s[:l//2]
    a = s[l//2:][::-1]
count = 0
for x,y in zip(b, a):
    if x != y:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S=raw_input()

ans=0
for x,y in zip(S,S[::-1]):
    if x!=y:
        ans+=1
print ans/2

Submission status: Accepted

Solution code:
S = list(input())
n = len(S)
r = S[:n//2]
l = S[n-n//2:]
l.reverse()
c = 0
for i, j in zip(r, l):
    if i != j:
        c += 1
print(c)

Submission status: Accepted

Solution code:
s = input()
n = len(s) // 2
res = 0
for a, b in zip(s[:n], reversed(s[-n:])):
    if a != b:
        res += 1
print(res)

Submission status: Accepted

Solution code:
s = input()
 
c = 0
N = len(s)
for i in range(N // 2):
    if s[i] != s[N - 1 - i]:
        c += 1
print(c)

Submission status: Accepted

Solution code:
S = input()

counter = 0
for i in range(len(S) // 2):
    if S[i] != S[-i - 1]:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
S = list(input())
n = len(S)
cnt = 0
for i in range(n//2):
    if S[i] != S[n-1-i]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
S = input()
cnt=0
for i in range(len(S)//2):
  #print(S[i] , S[-1-i])
  if S[i] != S[-1-i]:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
S = input()
print(sum([S[i] != S[-i-1] for i in range(len(S)//2)]))

Submission status: Accepted

Solution code:
S = input()
half=len(S)//2

rS = list(reversed(S))
#print(S, rS)

cnt=0
for i in range(half):
  if S[i] != rS[i]:
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
l = len(s)
num = int(l / 2)

count = 0
for i in range(num):
    if s[i] != s[-(i+1)]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = input()
if len(S)%2 == 0:
    tmp1 = S[:len(S)//2]
    tmp2 = S[len(S)//2:]
    tmp2 = tmp2[::-1]
    count = 0
    for i in range(len(tmp1)):
        if tmp1[i] != tmp2[i]:
            count += 1
    print(count)
else:
    tmp1 = S[:len(S)//2]
    tmp2 = S[len(S)//2+1:]
    tmp2 = tmp2[::-1]
    count = 0
    for i in range(len(tmp1)):
        if tmp1[i] != tmp2[i]:
            count += 1
    print(count)

Submission status: Accepted

Solution code:
S = input()
c = 0
for i in range(len(S)//2):
  if S[i] != S[len(S)-i-1]:
    c+=1
print(c)

Submission status: Accepted

Solution code:
S = input()
N =len(S)

S1 = S[:N//2]
S2 = S[-(N//2):]
S2 = S2[::-1]
ans = 0
for i in range(len(S1)):
    if S1[i] != S2[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
count = 0
for i in range(n//2):
  if s[i] != s[n-1-i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()

ans = 0
if len(s)%2 == 0:
    for i in range(len(s)//2):
        if s[i] != s[len(s)-i-1]:
            ans += 1
else:
    for i in range(len(s)//2):
        if s[i] != s[len(s)-i-1]:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
S = input().strip()

ans = 0
for i in range(len(S) // 2):
    if S[i] != S[len(S) - 1 - i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import numpy as np

str = input()

count = 0

for n in range(int(np.floor(len(str)/2))):
    if str[n] != str[-1-n]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
S=str(input())
l=len(S)
count=0
for i in range(l//2):
  if S[i]!=S[l-1-i]:
    count+=1

print(count)

Submission status: Accepted

Solution code:
s = list(input())
count=0
for i in range(len(s) // 2):
    if s[i] == s[-i-1]:
        pass
    else:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = input()
c = 0 
for i in range(len(S)//2):
        if S[i] != S[-i - 1]: 
                c += 1
print(c)

Submission status: Accepted

Solution code:
S=input()
N=len(S)
k=0
if N%2==0:
  m=N/2
else:
  m=(N-1)/2
for i in range(int(m)):
  if S[i]!=S[N-1-i]:
    k+=1
print(int(k))

Submission status: Accepted

Solution code:
s = str(input())

ans = 0

for i in range(0, len(s)//2):
  if s[i] != s[len(s)-1-i]:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
s = input()

ans = 0
for i in range(len(s)):
    if s[i] != s[-i-1]:
        ans += 1

print(ans // 2)

Submission status: Accepted

Solution code:
def main():
    s=input()
    low=0
    high=len(s)-1
    cnt=0
    while low<high:
        if s[low]!=s[high]:
            cnt+=1
        low+=1
        high-=1
    print(cnt)

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
n = len(s)
ans = 0
for i in range(len(s)//2):
    if s[i] != s[n-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
	s = input()
	n = len(s)
	m = n // 2
	ct = 0
	for i in range(m):
		if s[i] != s[n - i - 1]:
			ct += 1
	print(ct)

if __name__=='__main__':
	main()

Submission status: Accepted

Solution code:
s = input()

l = len(s)

if l % 2 == 0:
    s1 = s[0:l//2]
    s2 = s[l//2:]
else:
    s1 = s[0:l//2]
    s2 = s[l//2+1:]

s2 = s2[::-1]

cnt = 0
for x, y in zip(s1, s2):
    if x != y:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import math
S = input()
ans = 0
for i in range(math.ceil(len(S)/2)):
    if S[i] != S[-(i+1)]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    s = input()
    slen = len(s)
    x = slen//2
    ans = 0
    for i in range(x):
        if not s[i] == s[-i-1]:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
n = len(s)
ans = 0
for i in range(n // 2):
    if s[i] != s[-i - 1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))


s = input()

cnt = 0
for i in range(len(s)//2):
  if s[i] != s[len(s)-1-i]:
    cnt += 1


print(cnt)

Submission status: Accepted

Solution code:
s = input()
half = len(s) // 2
count = 0
for i in range(half):
    if s[i] != s[-(i + 1)]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
s1 = input()
s2 = s1[::-1]
count = 0
for i in range(len(s1)//2):
    if s1[i] != s2[i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline().rstrip()
l = len(s)
def main():
    cnt = 0
    for i in range(l // 2):
        if s[i] != s[-i-1]:
            cnt += 1

    return cnt

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
s = input()

l = len(s)
ans = 0
for i in range(l//2):
    if s[i] != s[l-1-i]:
        ans += 1


print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()

ans = 0
for i in range(len(S)):
    if S[i] != S[::-1][i]:
        ans += 1

print(ans // 2)

Submission status: Accepted

Solution code:
from sys import stdin
S = (stdin.readline().rstrip())
l=len(S)
ans = 0
for i in range(l//2):
    if S[i] != S[::-1][i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
s_t = s[::-1]
c = 0
for i in range(len(s)//2):
  if s[i] != s_t[i]:
    c += 1
print(c)

Submission status: Accepted

Solution code:
s=list(input())
cnt=0
for i in range(len(s)):
  if s[i] != s[-1*(i+1)]:
    cnt+=1
print(cnt//2)

Submission status: Accepted

Solution code:
s = input()

left = 0
right = len(s) - 1
ans = 0

while left < right:
    if s[left] != s[right]:
        ans += 1
    left += 1
    right -= 1

print(ans)

Submission status: Accepted

Solution code:
S = input()
ans = 0
for i in range(len(S)//2):
    if S[i] != S[-i-1]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s = list(x for x in input())
ans = 0

for i in range(len(s)//2):
  if s[i] == s[-(i+1)]:
    continue
  else:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
if len(s) % 2 == 1:
    #奇数
    a = s[:(len(s)-1)//2]
    b = s[(len(s)+1)//2:]
else:
    #偶数
    a = s[:len(s)//2]
    b = s[len(s)//2:]
b = b[::-1]
#print(a,b)
c = 0
for i in range(len(s)//2):
    if a[i] != b[i]:
        c += 1
print(c)

Submission status: Accepted

Solution code:
S = input()

count = 0

for i in range(len(S) // 2):
    if S[i] != S[-1 - i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = input()
s_front = S[:len(S)//2]
s_back = reversed(S[-(len(S)//2):])

ans = 0

for f, b in zip(s_front, s_back):
  if f != b:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
s=input()
cnt=0
for i in range(len(s)//2):
    if s[i]!=s[-1-i]:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
s = list(input())
count = 0
for index in range(len(s)):
    rev_i = len(s) - index - 1
    if s[index] != s[rev_i]:
        count += 1
print(count//2)

Submission status: Accepted

Solution code:
a = input()
c = 0
for i in range(len(a)//2):
  if a[i] != a[len(a)-1-i]:
    c += 1
print(c)

Submission status: Accepted

Solution code:
S = input()
N = len(S)

if N%2==0:
  s1 = S[:N//2]
  s2 = S[N//2:][::-1]
else:
  s1 = S[:N//2]
  s2 = S[N//2+1:][::-1]

answer = 0
for i in range(N//2):
  if s1[i]!=s2[i]:
    answer += 1
print(answer)

Submission status: Accepted

Solution code:
s=input()
a=s[::-1]

ans=0
for i in range(len(s)//2):
    if s[i] != a[i]:
        ans +=1
        

print(ans)

Submission status: Accepted

Solution code:
S = str(input())
x = int(len(S)//2)
count = 0

for i in range(x):
  j = i + 1
  if S[i] != S[-j]:
    count += 1
    
print(count)