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()
if len(s) % 2 == 0:
    half_len = int(len(s)/2)
    f_half = s[:half_len]
    l_half = s[half_len:][::-1]
else:
    half_len = int((len(s)-1)/2)
    f_half = s[:half_len]
    l_half = s[half_len+1:][::-1]
counter = 0
for i in range(len(f_half)):
    if f_half[i] != l_half[i]:
        counter += 1
print(counter)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
S = list(input())
lis=[]
for i in range(int(len(S)/2)):
    if S[i]==S[-(i+1)]:
        continue
    else:
        lis.append(S[i])
print(len(lis))

Submission status: Accepted

Solution code:
line = list(input())
n = len(line)
if n%2==1:
    a = int(n/2)
    a_count = 0
    for i in range(0,n-a-1):
        if line[i] != line[n-i-1]:
            a_count += 1

    print(a_count)
else:
    b = int(n/2)
    b_count = 0
    for t in range(0,n-b):
        if line[t] != line[n-1-t]:
            b_count+=1
    print(b_count)

Submission status: Accepted

Solution code:
s = input()
counter = 0

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

Submission status: Accepted

Solution code:
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:
s = [i for i in 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:
N = list(input())

num = len(N)
num = num / 2
num = int(num)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

lst1 = s[0:int((l+1)/2)]
lst2 = s[int((l+1)/2)+1:]
lst2 = s[::-1]

ans =0
for i in range(l//2):
    if lst1[i] != lst2[i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

s = list(input())
i = count = 0
j = -1

while True:
    if s[i] != s[j]:
        s[j]=s[i]
        count += 1
    
    i += 1
    j -= 1
    
    if i > ( len(s) / 2):
        break

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import datetime

# 入力
#N = int(input())
S = str(input())
#N, A, B = map(int, input().split())
#A, B, C = map(int, input().split())

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

print (c)

Submission status: Accepted

Solution code:
S = str(input())
N = len(S)//2
i = 0
n = 0

while i <= N-1:
    if S[i] == S[-(i+1)]:
        n += 0
        i += 1
    elif S[i] != S[-(i+1)]:
        n += 1
        i += 1

print(n)

Submission status: Accepted

Solution code:
import sys

palindrome = input().rstrip()
chars = []
for s in palindrome:
    chars.extend(s)

hug = 0
after = -1
for key, value in enumerate(chars):
    if(key > (len(chars) - 1) / 2):
        break
    if(value != chars[after]):
        chars[after] = value
        hug += 1
    after -= 1

print(hug)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_b

S = input()

leng = int(len(S) / 2)
mleng = int(len(S))
count = 0

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

print(count)

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:
s = list(input())

reverse = list(reversed(s))
center = len(s) // 2

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

print(count)

Submission status: Accepted

Solution code:
s = list(input())
index = len(s) // 2
before = list(''.join(s[0:index]))
af = s[index:]
af.reverse()
after = list(''.join(af))
c = 0
for x in range(len(before)):
  if before[x] == after[x]:
    continue
  else:
    c += 1

print(c)

Submission status: Accepted

Solution code:
#b
s=str(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()
l=len(s)
u=[]
for i in range(l):
    u.append(s[i])
k=int(l/2)
cnt=0
for j in range(k):
    if u[j]!=u[l-1-j]:
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = input()
n = len(S)
num = 0
for i in range(int(n/2)):
  if(S[i] != S[n-1-i]):
    num += 1
print(num)

Submission status: Accepted

Solution code:
N = input()
if len(N)%2 == 0:
  a = N[:len(N)//2]  
  b = N[len(N)//2:]
  b = b[::-1]
elif len(N)%2 == 1:
  a = N[:len(N)//2+1]  
  b = N[len(N)//2:]
  b = b[::-1]
t = 0
#print(a)
#print(b)
for i in range(len(a)):
  if a[i] != b[i]:
    t+=1
print(t)

Submission status: Accepted

Solution code:
S = [i for i in input()]
S_len = len(S)
ans = 0
if (S_len % 2 == 0):
    a = S[0:int(S_len / 2)]
    b = S[int(S_len / 2):S_len][::-1]
    for i,j in zip(a,b):
        if not i == j:
            ans += 1
        else:
            continue
else:
    a = S[0:int(S_len / 2)]
    b = S[int(S_len / 2) + 1:S_len][::-1]
    for i,j in zip(a,b):
        if not i == j:
            ans += 1
        else:
            continue
print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
S = input()
S = list(S)
count = 0
for a, b in zip(S, reversed(S)):
    if a != b:
        count += 1
print(count//2)
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

backword = S[::-1]

counter = 0

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

print(counter // 2)

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
import math
DEBUG = False
S = input()

cnt = 0
mid = int(math.floor(len(S)/2))

for i in range(mid):
    fch = S[i]
    bch = S[-(i+1)]
    if fch != bch:
        cnt += 1
    if DEBUG: print("(fch, bch)= (%s , %s)"%(fch, bch))
print(cnt)

Submission status: Accepted

Solution code:
S = input()

left = 0
right = len(S) - 1
count = 0

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

print(count)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

m=10**9 + 7 

S=input()
n = len(S)
m = n // 2
#print(S,n,m )

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = list(input())
m=len(s)//2
t=-1
cnt=0

for i in s[:m]:
    if i != s[t]:
        cnt+=1
    t-=1
    
print(cnt)

Submission status: Accepted

Solution code:
s = input() 

n = len(s)
i = 0
j = n - 1
count = 0
while(i <= j):
    if s[i] != s[j]:
        count += 1
    i += 1
    j -= 1

print(count)

Submission status: Accepted

Solution code:
s = input()
s1 = []
s2 = []
n = len(s)

for i in range(n//2):
        s1.append(s[i])
        s2.append(s[n-i-1])

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

print(ans)

Submission status: Accepted

Solution code:
import math

s = 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:
s=list(input())
x=len(s)
c=0
for i in range((x+1)//2):
  if s[i]!=s[-i-1]:
    c+=1
print(c)

Submission status: Accepted

Solution code:
s = input()
word_count = len(s)//2
front = s[:word_count]
if len(s)%2 == 0:
    back = s[word_count:]
else:
    back = s[word_count+1:]

back_reversed = back[::-1]

ans = 0

for i in range(word_count):
    if front[i] != back_reversed[i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
S = str(input())

words = len(S)
total = 0

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

Submission status: Accepted

Solution code:
S = input()
count = 0

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

print(int(count/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
m=len(s)
n=(m+1)//2
ans=0


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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)
n = N//2
S1 = list(S[:n])
S2 = list(S[N-1:N-n-1:-1])

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

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = len(s)

c = 0
co = 0
h = int(l / 2)
for i in range(h):

    co = co + 1
    if(S[i] != S[l-co]):
        c = c + 1
    

print(c)

Submission status: Accepted

Solution code:
S = input()
Sr = ''.join(reversed(S))

half_len = int(len(S) / 2)
count = 0
for s, sr in zip(S[:half_len], Sr[:half_len]):
    if s != sr:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import math
s=list(input())
r=[0]*len(s)
for i in range(len(s)):
    r[len(s)-i-1]=s[i]

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

s = input()[:-1]
hl = len(s) // 2
s1, s2 = s[:hl], s[:-hl - 1:-1]
ans = 0

for i1, i2 in zip(s1, s2):
    if i1 != i2:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
i = 0
j = len(s) - 1
cnt = 0
while i<=j:
    if s[i] != s[j]:
        cnt+=1
    i+=1
    j-=1
print(cnt)

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 = list(input())
s = list(reversed(S))
ans = 0
for i in range(len(S)):
    if not S[i] == s[i]:
        ans += 1
print(ans // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
s_ = list(reversed(s))

harf = int(len(s)/2)


n = 0
for i, j in zip(s[:harf], s_[:harf]):
    if i != j:
        n += 1

print(n)

Submission status: Accepted

Solution code:
import math


def inputIntList():
    return [int(s) for s in input().split()]


def inputInt():
    return int(input())


def main():
    S = input()
    cnt = 0
    for s, r in zip(S[: int(len(S) / 2) + 1], S[: int(len(S) / 2) - 1 : -1]):
        # print(s, r)
        if s != r:
            cnt += 1

    return cnt


if __name__ == "__main__":
    print(main())

Submission status: Accepted

Solution code:
def main(s: str):
    l = len(s)

    i = 0
    ans = 0

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

        i += 1

    print(ans)


if __name__ == "__main__":
    s = input()

    main(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
# B
def palindrome(string): return True if string==string[::-1] else False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

S = list(S)
l = len(S) - 1

result = 0

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

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()
count = 0
for i in range(len(S)//2):
  if S[i] != S[len(S)-1-i]:
    count = count + 1
  else:
    count = count
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

loop_count = int(len(s) / 2)
s_list = list(s)
count = 0

for _ in range(loop_count):
  f = s_list.pop(0)
  b = s_list.pop(-1)
  if f != b:
    count += 1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
counter = 0
length = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(S)%2 == 0:
  s1 = S[:len(S)//2]
  s2 = S_rev[:len(S)//2]
else:
  s1 = S[:len(S)//2 +1]
  s2 = S_rev[:len(S)//2 +1]
count = 0
for i in range(len(s1)):
  if not s1[i] == s2[i]:
    count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(1, len(s)//2 + 1):
    if s[i-1] == s[-i]:
        continue
    else:
        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) - 1 - i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
test = ""
#test = \
"""
redcoder
"""
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
    
    
s = list(input2())
r = list(reversed(s))
c = 0
for i in range(len(s)):
    if s[i] != r[i]:
        c += 1

print(c//2)

Submission status: Accepted

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

Submission status: Accepted

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

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:
s = input()

N = len(s)

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

print(int(cnt/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

S_reverse = S[::-1]


count = 0
for i in range(len(S)):
    if not S[i] == S_reverse[i]:
        count += 1

print(count // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
data = input()
length = len(data)
counta = 0
for i in range(0,math.ceil(length/2)):
    #print(data[i] + data[-i-1])
    if data[i] != data[-i-1]:
        counta += 1
print(counta)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
S = input()[0:-1]
Sr = S[::-1]
count = 0
for i in range(0,int(len(S)/2)):
  if S[i] != Sr[i]:
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math
def sol(S):
    sz = len(S)
    if sz == 0: return 0

    if sz % 2 == 0:
        l = (sz // 2) - 1
        r = (sz // 2)
    else:
        l = r = (sz //2)
    c = 0
    while l >= 0:
        if S[l] != S[r]:
            c += 1
        l -= 1
        r += 1
    return c




do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    # n = int(parsed_lines[0][0])
    # k = int(parsed_lines[0][1])
    S = parsed_lines[0][0]
    return S


if not do_submit:
    S = input_parse("""
    1905
    """)
    print(sol(S))

    S = input_parse("""
    0112
    """)
    print(sol(S))

    S = input_parse("""
    1700
    """)
    print(sol(S))

    S = input_parse("""
    0000
    """)
    print(sol(S))

    S = input_parse("""
    1001
    """)
    print(sol(S))



else:
    #A, B = list(map(int, input().split()))
    S = input()
    print(sol(S))

    # S = input().strip()
    # print(sol(S))

Submission status: Accepted

Solution code:
S = input()

length = len(S) // 2

l = S[0:length]
r = S[len(S) - length:len(S)]

cnt = 0
for i in range(length):
    if l[i] != r[length - i - 1]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
flg = 0
i = 0
j = -1
if len(s) == 1:
	print (0)
	exit()
while flg == 0:
	if s[i] != s[j]:
		cnt += 1
	#print (s[i],s[j])
	if len(s)//2 == i+1:
		flg =1
	i += 1
	j += -1
print (cnt)

Submission status: Accepted

Solution code:
S = list(input())
N = len(S)
n2 = N //2

res = 0
for i in range(n2):
        if S[i] != S[-i-1]:
                res += 1
print(res)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
s = str(input())

if len(s) % 2 == 0:
    a = s[:len(s)//2]
    b = s[len(s)
          //2:]

else:
    a = (s[:len(s)//2])
    b = (s[len(s)//2 + 1:])

a = list(a)    
b = [i for i in reversed(b)]
#print(a,b)
ans =0
for i in range(len(a)):
    if a[i] != b[i]:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

S = input()

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

print(count)

Submission status: Accepted

Solution code:
S = input()
S = [i for i in S]
S_inverse = S[::-1]

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

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
if cnt != (len(s)//2):
    ans = (len(s)//2)-cnt
else:
    ans = 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    length = int(len(S)/2)
    ans = 0
    for a, b in zip(S[0:length], S[::-1]):
        if a != b:
            ans += 1
    
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

i = 0
j = len(s)-1
ans = 0

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = list(input())
S_ = S[::-1]
n = 0
for i in range(len(S)//2):
    if S == S_: break
    elif S[i] != S_[i]:
        S_[i] = S[i]
        n += 1
print(n)

Submission status: Accepted

Solution code:
def main():
    S = input()
    N = len(S)
    if N % 2 == 0:
        first = list(S[:N//2])
        second = list(S[N//2:N])
        second.reverse()
        cnt = 0
        for i in range(N//2):
            if first[i] != second[i]:
                cnt += 1
    else:
        first = list(S[:N//2])
        second = list(S[N//2 + 1:N])
        second.reverse()
        cnt = 0
        for i in range(N//2):
            if first[i] != second[i]:
                cnt += 1


    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/g.inp"; exit $?
exit 0
'''
import sys

def _s(): return sys.stdin.readline().strip()

s = _s()
n = len(s)
mid = n//2
if len(s)%2==0:
    nh = mid
    s1= s[0:mid]
    s2= s[mid:][::-1]
else:
    nh = mid + 1
    s1= s[0:nh]
    s2= s[mid:][::-1]
#
cnt = 0
for i in range(nh):
    if s1[i]!=s2[i]: cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
bs = s[:int(len(s)/2)]
cs = list(reversed(s[int(len(s)/2):]))
c = 0
for n in range(int(len(s) / 2)):
    if bs[n] != cs[n]:
        c += 1

print(c)

Submission status: Accepted

Solution code:
import math
s = input()
a = len(s)
ans = 0

for i in range(math.floor(a/2)):
    if s[i]!=s[a-1-i]:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:

s=input()

le=len(s)
count=0

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

print(count)

Submission status: Accepted

Solution code:
s = input()
count = 0
x = -1

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

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
s = str(input())
half_slen = int(len(s)/2)
half=s[0:half_slen]
ahalf=''.join(list(reversed(s[-half_slen:])))

cnt=0
for i in range(0,half_slen):
    if half[i] != ahalf[i]:
        cnt+=1
print(cnt)

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(i)

print(ans)

Submission status: Accepted

Solution code:
S = input()

l = len(S)
if l % 2 == 0:
    res = 0
    h = l // 2
    p = S[:h]
    q = S[h:]
    for i in range(h):
        if not p[i] == q[(i + 1) * -1]:
            res += 1
    print(res)
else:
    res = 0
    h = l // 2
    p = S[:h]
    q = S[h+1:]
    for i in range(h):
        if not p[i] == q[(i + 1) * -1]:
            res += 1
    print(res)

Submission status: Accepted

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

cnt1 = 0
cnt2 = 0

for i in range(0, n//2):
    #print(S[i], S[-i-1])
    if S[i] != S[-i-1]:
        cnt1 += 1
print(cnt1)

Submission status: Accepted

Solution code:
S = input()
str_a = ""
str_b = ""
if (len(S) % 2 == 1) :
    str_a = S[0:len(S)//2]
    str_b = S[(len(S)//2) + 1 :][::-1]
else :
    str_a = S[0:len(S)//2]
    str_b = S[len(S)//2:][::-1]

diff = 0
for i in range(len(str_a)) :
    if (str_a[i] != str_b[i]) :
        diff += 1

print(diff)

Submission status: Accepted

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