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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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()
nagasa=len(S)
kaisu=int(nagasa/2)
ans=0
for i in range(kaisu):
    if S[i]!=S[nagasa-i-1]:
        ans+=1


print(ans)

Submission status: Accepted

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

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 = input()
if len(s) % 2 == 0:
    s1 = s[:len(s) // 2]
    s2 = s[:len(s) // 2 - 1:-1]
else:
    s1 = s[:len(s) // 2]
    s2 = s[:len(s) // 2 : -1]
cnt = 0
for index, value in enumerate(zip(s1, s2)):
    if value[0] == value[1]:
        continue
    else:
        #s1[index] = value[0]
        s1 = s1[:index] + value[0] + s1[index:]
        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()
count = 0
re_s = s[::-1]
for i in range(len(s)):
  if re_s[i] != s[i]:
    count += 1
y = int(count/2)
print(count-y)

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()
N = len(S)
output = 0

if N%2==0:
    S1 = S[:(N//2)]
    S2 = S[(N//2):]
else:
    S1 = S[:(N//2)]
    S2 = S[(N//2+1):]

for i in range(len(S1)):
    A = S1[i]
    B = S2[len(S1)-i-1]
    if A!=B:
        output += 1
print(output)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(input())
a_pre=a[:len(a)//2]
a_post=a[len(a)//2:]
a_post.reverse()
if a_pre==a_post:
            print('0')
else:
            cnt=0
            for i in range(len(a_pre)):
                        if a_pre[i]!=a_post[i]:
                                    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[-i-1]:
    ans=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:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    cnt = 0
    for i in range(len(s)):
        if s[i] != s[-i-1]:
            cnt += 1
    print(cnt // 2)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

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:
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque
#from functools import reduce

#a, b = [int(v) for v in input().split()]


def main():
    S = input()

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


main()

Submission status: Accepted

Solution code:
S = input()
res = 0

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

print(int(count/2))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

num = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
if len(s)%2 == 0:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2:]
else:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
#print(s1,s2)
i = 0
j = -1
cnt = 0
while len(s1) > i:
    if s1[i] != s2[j]:
        cnt += 1
    i += 1
    j -= 1
print(cnt)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
def inputS(): return input().rstrip().decode()
readlines = sys.stdin.buffer.readlines  

S = inputS()

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

cnt = 0
for si in range(n):
  ti = n-si-1
  if si == ti: break
  if s[si] != s[ti]:
    s[si] = s[ti]
    cnt = cnt + 1
print(cnt)

Submission status: Accepted

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

cnt = 0
for si in range(n):
  ti = n-si-1
  if s[si] != s[ti]:
    s[si] = s[ti]
    cnt = cnt + 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()
ans = 0
length = int(len(s)/2)
s_f = s[:length]
s_b = list(reversed(list(s[length:])))
s_b = ''.join(s_b)
for i in range(length):
  if s_f[i] != s_b[i]:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = list(input())
num = len(str)//2
count=0

for i in range(0,num):
  if not str[i] == str[-i-1]:
    count = count+1
    
print(count)

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()
l = len(s) // 2
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
  input_line=input()
  first_half=input_line[:math.ceil(len(input_line)/2)]
  latter_half=input_line[-math.ceil(len(input_line)/2):]
  latter_half=latter_half[::-1]
  answer=0
  for i in range(len(first_half)):
    if(first_half[i]!=latter_half[i]):
      answer+=1
  print(str(answer))

Submission status: Accepted

Solution code:
S = input()
rev_S = S[::-1]
length = len(S)//2
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

half = len(s)//2

res = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
count = 0

leng = len(S)


        
for i in range(0,int(leng/2)):
    if(S[i] != S[leng-i-1]):
        count+=1
    
print("%d"%(count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
ans=0

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

front = s[:-(-l//2)]
back = s[l//2:]
back = back[::-1]

res = 0

for i in range(-(-l//2)):
    if front[i] != back[i]:
        res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(int(chng/2))

Submission status: Accepted

Solution code:
s = list(input())

a = s[:len(s)//2]
b = list(reversed(s[len(s)//2:]))

print([a[i] != b[i] for i in range(len(s)//2)].count(True))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

Solution code:
st = input()

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

Submission status: Accepted

Solution code:
import numpy as np

S = str(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc147/tasks/abc147_b

s1 = input()
s2 = s1[::-1]
e = [l1 != l2 for l1, l2 in zip(s1, s2)]
print(e.count(True) // 2)

Submission status: Accepted

Solution code:
s1=[x for x in input()]
s2=s1[::-1]
cnt=0
for i in range(len(s1)):
  if s1[i] != s2[i]:
    cnt+=0.5
print(int(cnt))

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

for i in range(n//2):
    if not s[i] == s[-1-i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
S = input()

len_half = (len(S)+1)//2
ans = 0

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

print(ans)

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
a=input()

i = 0
j = 0

while a != a[::-1]:
	if(a[i]!=a[len(a) - i - 1]):
		sList = list(a)
		sList[i] = sList[len(a) - i - 1]
		a = "".join(sList)
		j += 1
	i += 1

print(j)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def main():
    S = list(input())
    print(sum([fst != sec for fst, sec in zip(S[::], S[::-1])]) // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
s = "".join(reversed(list(S)))

count = 0
for a, b in zip(S, s):
    if a != b:
        count += 1

reault = int(count / 2)

print(reault)

Submission status: Accepted

Solution code:
S = input()
T = S[::-1]
a = 0

for s,t in zip(S,T):
  if s!=t:
    a+=1

print(a//2)

Submission status: Accepted

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

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]:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(S: str):
    counter = 0
    l = len(S)
    for i in range(l//2):
        if S[i] != S[l-i-1]:
            counter += 1
    print(counter)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = 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:
a=input()
ori=list(a)
q=list(a)
q.reverse()
n=[i for i,j in zip(ori,q) if i==j]
ans=(len(ori)-len(n))//2
print(ans)

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:
o = list(input())
rev = [ 0 for i in range(len(o)) ]

for i in range(1, len(o)+1):
  rev[i-1] = o[i * -1]
  if i == len(o)+1:
    rev[-1] = o[0]

ans = 0
for j in range(len(o)):
  if str(o) == str(rev):
    break

  if o[j] != rev[j]:
    o[j] = rev[j]
    rev[(j+1) * -1] = rev[j]
    ans += 1


print(ans)

Submission status: Accepted

Solution code:
s=input()
score=0

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

print(score)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s = 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 = 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()
SR=S[::-1]
ans=0

for i in range(len(S)):

    if S[i] != SR[i]:
        ans = ans + 1
        S = S[:i] + SR[i] + S[i+1:]
        SR=S[::-1]


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
P = ""
if(len(s)%2 == 0):
    P = s[:(len(s)//2)]+s[(len(s)//2-1)::-1]
else:
    P = s[:len(s)//2]+s[len(s)//2]+s[(len(s)//2-1)::-1]
cnt = 0

for j in range(len(s)):
    if(s[j] != P[j]):
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

print(ans)

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

ss=0
for i, j in zip(s, r):
    ss+=int(i!=j)

print(int(ss/2))

Submission status: Accepted

Solution code:
S = input()
a = len(S)
k1 = ''
k2 = ''
res = 0
if a % 2 == 0:
    for i in range(0,a//2):
        k1 += S[i]
    for i in range(a//2,a):
        k2 += S[i]
else:
    for i in range(0,(a-1)//2):
        k1 += S[i]
    for i in range((a-1)//2 + 1,a):
        k2 += S[i]
for i in range(len(k1)):
    if k1[i] != k2[(len(k1)-i-1)]:
        res += 1 
print(res)

Submission status: Accepted

Solution code:
S = input()

if len(S)%2==1:
    S1 = S[:len(S)//2]
    S2 = S[(len(S)//2)+1:]
else:
    S1 = S[:len(S)//2]
    S2 = S[(len(S)//2):]

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

print(hug)

Submission status: Accepted

Solution code:
s = list(input())
cnt = 0
while len(s)>1:
    if s.pop(0) == s.pop(-1):
        pass
    else:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()

s_list = list(s)

length = int(len(s) / 2 + 1)
count = 0

for dd in range(length):
    if s_list[dd] != s_list[len(s) -1 - dd]:
        s_list[len(s) -1 - dd] = s_list[dd]
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = str(input())

l = len(S)
l2 = int(l / 2)

count = 0
for i in range(l2):
    if not S[i] == S[l - 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[-(i+1)]:
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

if len(S) % 2 != 0:
    CentChara = len(S) // 2
    del letter[CentChara]

num = int(len(letter) / 2)
count = 0
bakcount = -1
fail = 0

for dif in range(num):
    PreChara = letter[count]
    BakChara = letter[bakcount]
    if PreChara != BakChara:
        fail += 1

    count += 1
    bakcount += -1

print(fail)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

ans = 0
for m, n in zip(S,S_inv):
  if m != n:
    ans +=1

print(int(ans/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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