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().rstrip()

si = 0
ei = len(s) - 1
num = 0
while si < ei:
    if s[si] != s[ei]:
        num += 1
    
    si += 1
    ei -= 1

print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
from collections import deque
s = deque(list(input()))
cnt = 0
while 1 < len(s):
    r = s.pop()
    l = s.popleft()
    if r != l:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


def main():
    S = readline().rstrip().decode()
    S_f = S[:len(S)//2]
    S_s = S[-len(S)//2:][::-1]
    ans = 0
    for s1, s2 in zip(S_f, S_s):
        if s1 != s2:
            ans += 1
    print(ans)


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:
def main():
    s = input()
    t = s[::-1]
    count = 0
    for i in zip(s, t):
        if i[0] != i[1]:
            count += 1
    print(count // 2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

ans = 0
lenS = int(len(S)/2)

for o,r in zip(S[:lenS], S[:lenS-1:-1]):
    if o != r:
        ans += 1
    
print(ans)

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()
lst = list(s)
cnt = 0
for i in range(len(lst)):
    if lst[i] != lst[len(lst)-1-i]:
        lst[i] = lst[len(lst)-1-i]
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

rslt = s[::-1]

count = 0

if len(s)%2==0:

    for i in range(len(s)//2):

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

        if s[i] != rslt[i]:
            count += 1

           



print(count)

Submission status: Accepted

Solution code:
import sys

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


def solve():
    S = input()

    l = len(S) // 2
    l2 = len(S)
    ans = 0

    for i in range(l):
        if not S[i] == S[l2 - i - 1]:
            ans += 1

    print(ans)


if __name__ == '__main__':

    solve()

Submission status: Accepted

Solution code:
import math
s = input()

n = len(s)
m = math.ceil((n/2))

count= 0

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

print(count)

Submission status: Accepted

Solution code:
import collections
s = raw_input()
count, i,j = 0,0, len(s) -1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    s = list(input()[:-1].decode())
    n = len(s)

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

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
s = input()
r = s[::-1]
count = 0

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

print(count//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

firstS = S[:len(S) // 2]
if len(S) % 2 == 0:
    secondS = list(reversed(S[len(S) // 2:]))
else:
    secondS = list(reversed(S[len(S) // 2 + 1:]))

count = 0

for x in range(len(firstS)):
    if firstS[x] != secondS[x]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = str(input())
c = 0

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

print(c)

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()
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()
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()
n=len(s)
 
c=0
i=0
while i<n-i-1:
  if s[i]!=s[n-i-1]:
    c+=1
  i+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(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 = input()
f = 0
b = -1
c = 0

while f < len(s)//2:
    if s[f] != s[b]:
        c += 1
    f += 1
    b -= 1

print(c)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

if len(s) % 2 == 0:
    a = s[:l // 2]
    b = s[-l // 2:][::-1]
else:
    a = s[:l // 2]
    b = s[-(l // 2):][::-1]

ans = 0

for i in range(l//2):
    if a[i] != b[i]:
        ans += 1
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = 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()
length = len(S)
L = length//2
if length%2==0:
    A = S[:L]
    B = S[L:]
else:
    A = S[:L]
    B = S[L+1:]
hug = 0
for i in range(L):
    if A[i] != B[::-1][i]:
        hug += 1
print(hug)

Submission status: Accepted

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

Submission status: Accepted

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

print(int(ans/2))

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

Submission status: Accepted

Solution code:
from math import floor
s = list(input())
l = floor(len(s)/2)
ans = 0
if not len(s)%2 == 0:
    a = s[:l]
    b = s[l+1:]
else:
    a = s[:l]
    b = s[l:]
b.reverse()
for _a, _b in zip(a, b):
    if _a == _b:
        continue
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
rev = s[::-1]
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

count=0

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

print(count)

Submission status: Accepted

Solution code:

S = input()
S_ = S[::-1]
ans = 0

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

Submission status: Accepted

Solution code:
s = input()
slen = len(s)
slist = list(s)
srev = list(reversed(slist))
ans = 0
for i in range(slen):
    if slist[i] != srev[i]:
        ans += 1
if ans > 0:
    ans = int(ans / 2)
print(ans)

Submission status: Accepted

Solution code:
s=list(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()
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()
ans=0
for i in range(len(S)//2):
    if S[i]==S[-i-1]:
        pass
    else:
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
import sys
import heapq
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

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

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())
r=0
n=len(s)
for ii in range(n//2):
  if s[ii]!=s[n-1-ii]:
    r+=1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

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:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
s=input()
ans=0
st=0
en=len(s)-1
while(st<en):
    if(s[st]!=s[en]):
        ans+=1 
    st+=1
    en-=1
print(ans)

Submission status: Accepted

Solution code:
S=input()

def count_diff2(q, a):
    return sum(
        c1 != c2 for c1, c2 in zip(q, a)
    )


if len(S)%2==0:
    Cut=int((len(S))/2)
    MAE=S[:Cut]
    USHIRO=S[-(Cut):]
    USHIRO=USHIRO[::-1]
    
    if MAE==USHIRO:
        print(0)
        quit()
    
    print(count_diff2(MAE,USHIRO))
    quit()

else:
    Cut=int((len(S))//2)
    MAE=S[:Cut]
    USHIRO=S[-(Cut):]
    USHIRO=USHIRO[::-1]
    
    if MAE==USHIRO:
        print(0)
        quit()
    
    print(count_diff2(MAE,USHIRO))
    quit()

Submission status: Accepted

Solution code:

s = str(input())
a =len(s)
s1 = s[::-1]

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

Submission status: Accepted

Solution code:
import sys

a= input()
c = 0
b = int(len(a)/2)

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

print(c)

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

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) // 2
a = s[:l]
b = s[:-(l + 1):-1]
count = 0
for i, j in zip(a, b):
    if i != j:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
t = s[::-1]
count = 0

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

Submission status: Accepted

Solution code:
S = list(input())
S_rev = list(reversed(S))

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

print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/python3

import sys

def input():
    return sys.stdin.readline().rstrip('\n')

#N = int(input())
S = input()
#D = list(map(int, input().split()))

length = len(S)
counter = 0

for i in range(length // 2):
    left = S[i]
    right = S[-(i+1)]
    #print(left,right)
    if left == right:
        continue
    else:
        counter +=1

print(counter)

Submission status: Accepted

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

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 = str(input())
ans = 0

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
# input
S = input()

hag = 0

a = 0
b = len(S) - 1

while a < b:

    if S[a] != S[b]:
        hag += 1
    a += 1
    b -= 1

print(hag)

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
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()
cnt = 0
for i in range(len(s)//2 ):
#    print(s[i], s[-i])
    if not 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[-i-1]:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()

if len(s)%2 == 0:
    mid = len(s)//2
    s_first = s[:mid]
    s_last = s[mid:]
else:
    mid = len(s)//2
    s_first = s[:mid]
    s_last = s[(mid+1):]
    
ans = 0
for i,j in zip(s_first, s_last[::-1]):
    if i!= j:
        ans += 1
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = 0
for f, b in zip(s, s[::-1]):
    if f!=b:
        ans+=1
print(ans//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
S = input()
T = S[::-1]
a = 0
for i in range(math.ceil((len(S))/2)):
    if not S[i] == T[i]:
        a = a+1
    else:
        pass

print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
S = input()
N = len(S)
left = tuple(S[:N // 2])
right = tuple(reversed(S))[:N // 2]

count = 0
for lc, rc in zip(left, right):
    count += int(lc != rc)

print(count)

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
import fileinput

s = input()

c = 0
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 = str(input())
ans = 0
temp = 0
l = int(len(s)) // 2

for i in range(l):
    temp = abs(temp)+1
    #print(i,abs(temp)*-1,s[i],s[abs(temp)*-1])
    if s[i] != s[temp*-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) - i - 1]: count += 1
print(count)

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:
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:44:19 2020

@author: shinba
"""

S = input()
T = S[::-1]

L = len(S)//2 
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
s = input()
len_s = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
s = input()
ans = 0
for f, b in zip(s, s[::-1]):
    if f!=b: 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
print(cnt)

Submission status: Accepted

Solution code:
S = str(input())
x = len(S)

if x % 2 == 0:
  Sb = S[:x//2]
  Sa = S[x//2:]
else:
  Sb = S[:x//2]
  Sa = S[(x+1)//2:]
Sar = Sa[::-1]
cnt = 0
for i in range(x // 2):
  if Sb[i] != Sar[i]:
    cnt += 1
  else:
    pass
print(cnt)

Submission status: Accepted

Solution code:
s = input()
slen = len(s)
i, count = 0, 0
while i != -(-slen // 2):
    if s[i] != s[slen - (i + 1)]:
        count += 1
    i += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
l=len(s)//2
ans=0
i=0
while i<l:
    if not s[i]==s[(-1)*(1+i)]:
        ans+=1
    i+=1
print(ans)

Submission status: Accepted

Solution code:
s = input()

l = len(s) // 2
ans = 0
i = 0
while i < l:
  if not s[i] == s[-(i + 1)]:
    ans += 1
  i += 1

print(ans)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s=input();print(sum(a<b for a,b in zip(s,s[::-1])))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    S=input()
    Sd=S[::-1]
    cnt=0
    for i in range(len(S)):
        if S[i]!=Sd[i]:
            cnt+=1
    print(cnt//2) 
#%%submit!
resolve()

Submission status: Accepted

Solution code:
# B - Palindrome-philia
s = list(input())
re_s = list(reversed(s))
cnt = 0
for i in range(len(s)//2):
    if s[i] != re_s[i]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Palindrome-philia

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

Submission status: Accepted

Solution code:
S = input()

right = S[-len(S) // 2:][::-1]

print(len(S) // 2 - sum(S[i]==right[i] for i in range(len(S) // 2)))

Submission status: Accepted

Solution code:
S = input()

left = S[:len(S) // 2]
right = S[-len(S) // 2:][::-1]

print(len(S) // 2 - sum([left[i]==right[i] for i in range(len(S) // 2)]))

Submission status: Accepted

Solution code:
s=list(input())
t=list(reversed(s))
a=0
x=0
for i in range(len(s)):
    a=(a+0 if s[x]==t[x] else a+1)
    x=x+1
print(a//2)

Submission status: Accepted

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

s = list(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()
ans=0
for i in range(int((len(S)+1)/2)):
    if 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=list(str(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()
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())
#print(s)
count=0
for i in range(len(s)//2):
    if s[i]!=s[-(i+1)]:
        #print(s[i],s[-(i+1)])
        s[-(i+1)]=s[i]
        count+=1
#print("".join(s))
print(count)

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(input())
cnt = 0
length = len(S) // 2
for i in range(length):
    if S[i] != 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 + l % 2):
    op = l - 1 - i
    if s[i] != s[op]:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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()
print(sum(s[i] != s[-i-1] for i in range(len(s) // 2)))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

ans = 0

rs = s.copy()
rs = rs[::-1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os

def main():
	s = input()
	num = 0
	if len(s)%2 == 0:	
		num = check(s[:len(s)//2], s[len(s)//2:])
	else:
		num = check(s[:len(s)//2], s[len(s)//2+1:])
	print(num)


def check(str_list1, str_list2):
	s1,s2 = str_list1, str_list2[::-1]
	count = 0
	for i in range(len(s1)):
		if s1[i] == s2[i]:
			pass
		else:
			count += 1
	return count


if __name__ == "__main__":
	main()