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()
c=0

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
len_ = int(len(S)/2)

cnt = 0
for i in range(0, len_):
    if S[i] !=  S[-(i+1)]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
S = input()
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
n = len(s)
ans = 0
harf_n = n//2
for i in range(harf_n):
    if s[i] != s[-i-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[l-1-i]:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input()
mojisu = len(S)
if mojisu % 2 == 1:
    S1 = S[:mojisu//2]
    S2 = S[mojisu//2+1:]
else:
    S1 = S[:mojisu//2]
    S2 = S[mojisu//2:]
S3 = []
for item in S2[::-1]:
    S3.append(item)
ans = 0
for i in range(mojisu//2):
    if S1[i] != S3[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
print(sum(x != y for x, y in zip(s, reversed(s))) // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000)

S = input()

hug_count = 0

left = 0
right = len(S) - 2

# print(S[left], S[right])


while left < right:
    if S[left] != S[right]:
        hug_count += 1
    left += 1
    right -= 1

print(hug_count)

Submission status: Accepted

Solution code:
import math

S = list(input())

S1 = S[0:math.floor(len(S)/2)]
S2 = S[math.ceil(len(S)/2):len(S)]

#print(S1)
#print(S2)
count = 0
for i in range(len(S)//2):
    s1_word = S1[i]
    s2_word = S2[len(S)//2 - i-1]
    if s1_word != s2_word:
        count += 1
    
print(count)

Submission status: Accepted

Solution code:
S = list(input())

count = 0

for i in range(int(len(S)/2)):
    #print(S[i],S[-i-1])
    if S[i] == S[-i-1]:
        pass
    else:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S=input()

#print(S)

count=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

s_front = S[:len(S)//2]
s_rear = S[len(S)//2:]
if len(s_front) != len(s_rear):
    s_front = s_front + s_rear[0]
s_front = s_front[::-1]

count = 0
for i, j in zip(s_front, s_rear):
    if i != j:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import math
s = str(input())
l = len(s)
count = 0
n = int(math.floor(l/2))
for i in range(n):
	if s[i] != s[-(i+1)]:
		count += 1
print(count)

Submission status: Accepted

Solution code:
s=input()
s2=len(s)//2
an=0
co=-1

for i in range(s2):
    if s[i]!=s[co]:
        an+=1
    
    co-=1

print(an)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

Submission status: Accepted

Solution code:
S = input()

cnt = 0
for i in range(int(len(S)/2)):

  if S[i]!=S[len(S)-1-i]:
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = list(str(input()))

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

Submission status: Accepted

Solution code:
S = input()
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
arr = list(input())

la = len(arr)

if la %2 ==0:
    a1 = arr[:la//2]
    a2 = arr[la//2:]
    a2.reverse()


    cnt = 0
    for i in range(la//2):
        if a1[i]  != a2[i]:
            cnt +=1

else:
    a1 = arr[:la//2]
    a2 = arr[la//2:]
    a2.reverse()
    cnt = 0
    for i in range(la//2):
        if a1[i]  != a2[i]:
            cnt +=1

print(cnt)

Submission status: Accepted

Solution code:
s=str(input())
l=len(s)

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

Submission status: Accepted

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

import math

S = list(str(input()))

r = 0
for i in range(math.floor(len(S) / 2.0)):
    if (S[i] != S[len(S) - (i + 1)]):
        r += 1

print(r)

Submission status: Accepted

Solution code:
import math
S = list(input())
cnt = 0

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
#input = sys.stdin.readline
import math

#import bisect

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


def main():
#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]
    s=list(input())
    a = [s[i] for i in range(0,len(s)//2)]
    b = [s[i] for i in range(len(s)-1,(len(s)-1)//2,-1)]
    count=0
    for i in range(len(a)):
        if a[i]!=b[i]:
            count+=1
    print(count)




#  print(c)




            #    print(n,kingaku(a,b,x))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)-1
i=0
C=0
while i < N-i:
	if S[i]!=S[N-i]:
		C+=1
	i+=1

print(C)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
cnt = 0

if len(S) % 2 == 0:
    n = len(S) // 2
    s1 = S[:n]
    s2 = S[:n-1:-1]
else:
    n = len(S) // 2 + 1
    s1 = S[:n-1]
    s2 = S[:n-1:-1]

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

print(cnt)

Submission status: Accepted

Solution code:

S = input()

mid = len(S) // 2

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()

sys.setrecursionlimit(10 ** 9)


def main():
    S = INPUT()

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

    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

mid = len(S)//2
#print(mid)
if len(S) % 2 == 0:
    pre = S[:mid]
    aft = S[mid:]
else:
    pre = S[:mid]
    aft = S[mid+1:]

#print(pre,aft)
result = 0
for i in range(mid):
    #print(pre[i],aft[mid-1-i])
    if pre[i] != aft[mid-1 - i]:
        result += 1

print(result)

Submission status: Accepted

Solution code:
import sys

S = sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
s_list=list(input())

if len(s_list) % 2 == 1:
    index_max = (len(s_list) - 1)//2 - 1
else:
    index_max = len(s_list)//2 - 1

count = 0
for i in range(index_max + 1):
    if s_list[i] != s_list[-(i + 1)]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a, b, c = map(int, input().split())
s = input()

len = len(s)

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def palindrome_philia(S: str)->int:
    ans = 0
    for i in range(len(S)//2):
        if S[i] != S[-(i+1)]:
            ans += 1
    return ans


if __name__ == "__main__":
    S = input()
    ans = palindrome_philia(S)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
s = input()
n = len(s)
count = 0
for i in range(0, n // 2):
    if s[i] != s[n-i-1]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = list(input())

length = len(S)
cnt = 0
if length %2  == 0:
    for i in range(int(length/2)):
      if S[i] != S[-(i+1)]:
        cnt += 1
      else:
        continue
    print(cnt)
else:
    for i in range(int(length/2)+1):
      if S[i] != S[-(i+1)]:
        cnt += 1
      else:
        continue
    print(cnt)

Submission status: Accepted

Solution code:
S=input()
if len(S)%2==0:
    S1=S[:len(S)//2]
    S2=S[len(S)//2:][::-1]
else:
    S1=S[:len(S)//2]
    S2=S[len(S)//2+1:][::-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()
l = len(S)
h = l // 2

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

Submission status: Accepted

Solution code:
s = input()
if len(s) % 2 == 1:
  sl = s[:int((len(s) - 1) / 2)]
  sr = s[int((len(s) +1 ) / 2):]
else:
  sl = s[:int(len(s)/ 2)]
  sr = s[int(len(s) / 2):]

err = 0
for i, c in enumerate(sl):
  err += 1 if c != sr[- i - 1] else 0 

print(err)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(int(ans/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(n)

Submission status: Accepted

Solution code:
target = input()

N = len(target) // 2

num = 0
for i in range(N):
    if target[i] != target[-(1+i)]:
        num += 1
print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

length = len(S)

a = 0

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

print(a)

Submission status: Accepted

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

def solve():
    S = input()
    res = 0
    for i in range(len(S)):
        res += S[i]!=S[-i-1]
    return res//2

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
# B - Palindrome-philia
S = input()

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = 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()
count=0

mid = len(S)//2

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 25 23:46:59 2019

@author: over-
"""


S=input()
L=len(S)
if L%2 ==1:
    L-=1
    S=S[:int(L/2)]+S[int(L/2)+1:]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
l = len(s)
if l%2==0:
    b = s[:l//2]
    e = s[l//2:]
else:
    b = s[:l//2]
    e = s[l//2+1:]

ee = list(reversed(e))



c = 0
for i,j in zip(b,ee):
    if i!=j:
        c+=1

print(c)

Submission status: Accepted

Solution code:
S=input()

count=0

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

Submission status: Accepted

Solution code:
s = [ i for i in input() ]

r = list(reversed(s))
cnt = 0
for i in range(len(s)):
  if  s[i] == r[i]:
    pass
  else:
    cnt += 1
    
print(int(cnt/2))

Submission status: Accepted

Solution code:
s = str(input())
l = len(s)
ans = int(0)
r = l // 2
if l % 2 == 0:
    for i in range(r):
        if s[i] != s[l - i - 1]:
            ans += 1
else:
    for j in range(r):
        if s[j] != s[l - j - 1]:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()

size = len(s)
if size % 2 != 0:
    size += 1

size = size // 2

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

print(ans)

Submission status: Accepted

Solution code:
S = input()

cnt = 0
for i in range(len(S) // 2):
  #print('{} {}'.format(S[i],S[-(i + 1)]))
  if S[i] != S[-(i + 1)]:
    cnt += 1

print(str(cnt))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

mid = len(S) // 2

count = 0
for i in range(0, mid):
        if S[i] != S[-1 -i]:
                count += 1


print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import *
from heapq import *
from fractions import gcd
import itertools
import math

sys.setrecursionlimit(10**6)

def InMap(): return list(map(int, input().split(' ')))
def In(): return int(input())
def InS(): return input()

S = InS()

if(len(S) % 2 == 0):
    S1 = S[0:int(len(S) / 2)]
    S2 = S[int(len(S) / 2)::]
else:
    S1 = S[0:int(len(S) / 2)]
    S2 = S[int(len(S) / 2) + 1::]
res = 0
for i in range(int(len(S) / 2)):
    if(S1[i] != S2[-(i+1)]):
        res += 1


print(res)

Submission status: Accepted

Solution code:
s = input()

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

print(count//2)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
S = list(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 = input()

s1 = s[0:len(s)//2]
s2 = s[len(s)-len(s)//2:len(s)]
s2 = s2[::-1]

count = 0

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

print(count)

Submission status: Accepted

Solution code:
S=list(input())

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = input()
    ans = 0
    for i in range(len(s)):
        a = s[i]
        h = len(s)//2
        if i <= h-1:
            if a != s[len(s)-i-1]:
                ans = ans+1
        else:
            break
    print(ans)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)
mid = N//2
left = ""
for i in range(mid):
    left += S[i]
right = ""
right_mid = mid
if N % 2 == 1:
    right_mid += 1
for i in range(N-1,mid-1,-1):
    right += S[i]
ret = 0
for i in range(mid):
    if left[i] != right[i]:
        ret += 1
print(ret)

Submission status: Accepted

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

cnt = 0
for i in range(h_len):
    if s[i] != s[-1-i]: 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 = str(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:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    S = input()

    diff = 0
    for s1, s2 in zip(S, S[::-1]):
        diff += s1 != s2
    print(diff // 2)


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

center = len(S) // 2
if len(S) % 2 == 0:
    head, tail = S[:center], S[center:]
else:
    head, tail = S[:center], S[center + 1:]

c = 0
for t, z in zip(head, tail[::-1]):
    if t != z:
        c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

print(count)

Submission status: Accepted

Solution code:
S = input()

l = len(S)

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

print(nhug)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(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:
a=input()
if len(a)%2==0:
    v=int(len(a)/2)
else:
    v=int((len(a)-1)/2)
c=0
for i in range(v):
    if a[i]!=a[-i-1]:
        c+=1
print(c)

Submission status: Accepted

Solution code:
s = input()
if s == s[::-1]:
    print('0')
else:
    left = s[:len(s) // 2]
    right = s[len(s) // 2 + (1 if len(s) % 2 else 0):][::-1]
    res = 0
    for a, b in zip(left, right):
        if a != b:
            res += 1
    print(res)

Submission status: Accepted

Solution code:
s=input()
n=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:
a = input()

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

Submission status: Accepted

Solution code:
s = str(input())

rev_s = s[::-1]

cnt = 0
for i in range(len(s)):
    #print(rev_s[i], s[i])
    if rev_s[i] != s[i]:
        cnt += 1


print(cnt//2)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


def LI(): return list(map(int, input().split()))


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    v1, v2, v3 =LI()
    v=v1+v2+v3
    if(v>=22):
        print('bust')
    else:
        print('win')
    return

# B


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

    
    print(count)
    return

# C


def C():
    A, B, X = LI()
    tmp=X//A
    
    i= tmp
    for x in range(tmp):
        #print(len(str(i)))
       
        if B*len(str(i))+(10**(len(str(i))-1))>X:
            i=(10**(len(str(i))-1))


        if (A*i)+(B*len(str(i)))<=X:
            if i>1000000000:
                i=1000000000
            print(i)
            return
        i-=1
    print(0)
    return
            


# D


def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':

    B()

Submission status: Accepted

Solution code:
s = input()

ite = 0
if len(s) % 2 == 0:
    ite = int(len(s) / 2)
else:
    ite = int((len(s) - 1) / 2)

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

print(count)

Submission status: Accepted

Solution code:
S = input()
li = list(S)

rli = li[::-1]

ans = 0
for k in range(len(li)):
    if li[k] == rli[k]:
        pass
    else:
        ans += 1/2

print(int(ans))

Submission status: Accepted

Solution code:
import sys
import math
from itertools import permutations
from itertools import combinations

#input = sys.stdin.readline
sys.setrecursionlimit(10**7)
S = input()

cnt = 0
rS = S[::-1]
if len(S)%2:
    for a, b in zip(S[:len(S)//2], rS[:len(S)//2]):
        if a != b:
            cnt += 1
else:
    for a, b in zip(S[:len(S)//2], rS[:len(S)//2]):
        if a != b:
            cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = 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:
import math
S = input()
n = len(S)
print(sum([S[i] != S[-(i+1)] for i in range(math.ceil(n/2))]))

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
#!python3.4.3

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import math

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    s = lines[0]

    return (s,)


def solve(s,):


    n = len(s)
    m = n // 2

    cnt = 0
    for i in range(m):
        if s[i] != s[-(i+1)]:
            cnt = cnt + 1
    
    return  cnt


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

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