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:
from sys import stdin
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin


def ii(): return int(stdin.readline())


def fi(): return float(stdin.readline())


def mi(): return map(int, stdin.readline().split())


def fmi(): return map(float, stdin.readline().split())


def li(): return list(mi())


def lsi():
    x=list(stdin.readline())
    x.pop()
    return x


def si(): return stdin.readline()


def sieve(x):
    a=[True]*(x+1)
    sq=floor(sqrt(x))
    for i in range(3, sq+1, 2):
        if a[i]:
            for j in range(i*i, x+1, i):
                a[j]=False
    if x>1:
        p=[2]
    else:
        p=[]
    for i in range(3, x+1, 2):
        if a[i]:
            p.append(i)
    return p
#vowel={'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'}
#pow=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
############# CODE STARTS HERE #############
a=lsi()
s, e=0, len(a)-1
c=0
while s<e:
    if a[s]!=a[e]:
        c+=1
    s+=1
    e-=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(int(count / 2))

Submission status: Accepted

Solution code:
S = input()
l = [i for i in S] 
count = 0

while len(l) > 1:

    if l.pop(0) != l.pop(-1):
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = input()

s = list(S)
ss = list(reversed(S))

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
l = 0
r = n-1
ans = 0

while l<r:
    if s[l]!=s[r]:ans+=1
    l+=1
    r-=1

print(ans)

Submission status: Accepted

Solution code:
x=input()
x_list=list(x)
y_list=[]

for i in(x_list):
	y_list.insert(0,i)
    
count=0
for i in range(len(x_list)):
	if x_list[i]!=y_list[i]:
		count+=1
        
print(int(count/2))

Submission status: Accepted

Solution code:
S = input()
s = 0

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

print(s)

Submission status: Accepted

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

S = input()
S = list(S[:-1])
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()

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

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

Submission status: Accepted

Solution code:
from math import floor, ceil

S = input()
a = S[:floor(len(S)/2)]

n = 0
for i in range(floor(len(S)/2)):
    if not a[i] == S[-(i+1)]:
        n += 1
    
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)
t = N // 2
ans = 0
for i in range(N):

    if len(S) % 2 == 0:
        if i == t:
            break
        if S[i] == S[N-1-i]:
            continue
        else:
            ans += 1
    else:
        if i == t:
            break
        if S[i] == S[N-1-i]:
            continue
        else:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
print(sum(1 for a, b in zip(s, s[::-1]) if ord(a) - ord(b)) // 2)

Submission status: Accepted

Solution code:
import sys
row = sys.stdin.readline
 
def read_string(row):
    return row().rstrip()
  
S = read_string(row)
S_rev = S[::-1]
cnt = 0
for i in range(len(S)):
    if S[i] != S_rev[i]:
        cnt +=1
print(cnt//2)

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

Submission status: Accepted

Solution code:
def kaibun(arr):
    count = 0
    arr_len = len(arr) - 1

    if arr_len % 2 == 0:
        for i in range(0, int(arr_len / 2)):
            if arr[i] != arr[arr_len-i]:
                count += 1
        return count
    else:
        for i in range(0, int((arr_len + 1) / 2)):
            if arr[i] != arr[arr_len-i]:
                count += 1
        return count


if __name__ == "__main__":
    s = input()
    arr = list(s)
    print(kaibun(arr))

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

print(cnt)

Submission status: Accepted

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

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())
t = 0
for i in range(len(S)):
  if S[i] == S[-1-i]:
    continue
  elif S[i] != S[-1-i]:
    S[-1-i] = S[i]
    t += 1
print(t)

Submission status: Accepted

Solution code:
s = input()

l = 0
r = len(s) -1

ans = 0
while l<r:
    if s[l] != s[r]:
        ans+=1
    l+=1
    r-=1

print(ans)

Submission status: Accepted

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

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[-i-1]:
    count+=1

print(count)

Submission status: Accepted

Solution code:
#147 b
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:
# a1,a2,a3 = map(int, input().split())
s = input()
s_rev = s[::-1]
len_s = len(s)
ans = 0


# 対象となる位置が両方異なっている場合は、普通に計算すると2個の間違いだが1にしてあげる
for i in range(len_s):
  if s[i] != s_rev[i]:
    ans += 1
  
print(int(ans/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:

s = list(input())

index = 0
ans = 0

if len(s) % 2 == 0:
    index = int(len(s) / 2)
else:
    index = int((len(s) // 2) + 1)

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

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

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

Submission status: Accepted

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

c = 0

for i, j in zip(s,n):
	if i != j:
		c += 1

print(int(c/2))

Submission status: Accepted

Solution code:
s = input()

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
s = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
S = input()

ss = ""
for i in range(len(S)):
    # print(i)
    ss += S[len(S) - i - 1]

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

print(int(count / 2))

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
list_str = input('')
a = list(list_str)
ans = 0

if len(a) % 2 == 1:
    a.pop(int(len(a)/2))


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

print(ans)

Submission status: Accepted

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

s = input()
lists = [c for c in s]
lists_rev = [i for i in lists[::-1]]

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

print(ans)

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

Submission status: Accepted

Solution code:
str = input()
cnt = 0
for i in range(len(str)):
  if i == (len(str) - 1 - i):
    break;
  if str[i] != str[len(str)-1-i]:
    cnt += 1
    
  if i + 1 == (len(str) - 1 - i):
    break;

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

hug = 0
for i in range(len(s)):  # 無駄な部分までループ回してしまっているがこんなコードしか書けない
    if s[i] != back_s[i]:
        hug += 1
print(hug//2)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
l = 0
r = len(s) - 1

while l < r:
    if s[l] != s[r]:
        cnt+=1
    l+=1
    r-=1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=input()
l=len(L)
i=0
count=0

while l-i-1>i:
    if L[i]==L[l-i-1]:
        i+=1
    else:
        count+=1
        i+=1
    

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(S: str):
    print([S[i] != S[::-1][i] for i in range(len(S))].count(True)//2)
    return



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:
import math
s = input()
slen = len(s)
i, count = 0, 0
while i != math.ceil(slen / 2):
    if s[i] != s[slen - (i + 1)]:
        count += 1
    i += 1
print(count)

Submission status: Accepted

Solution code:
sentence = input()
sentence_len = len(sentence)
iter_num = int(sentence_len/2)-1 if sentence_len % 2 == 0 else int(sentence_len/2)

counter = 0

for i in range(iter_num+1):
    if sentence[i] == sentence[sentence_len-i-1]:
        pass
    else:
        counter += 1
        
print(counter)

Submission status: Accepted

Solution code:
slist = list(input())

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

print(res)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
    s = input()
    count = 0
    for i in range(math.ceil(len(s) / 2)):
        if s[i] != s[len(s) - i - 1]:
            # print(i)
            # print(s[i], s[len(s) - i - 1])
            count += 1

    print(count)

Submission status: Accepted

Solution code:
S = input()

ans = 0

if len(S) % 2 == 1:
  n = int((len(S)-1) / 2)
else:
  n = int(len(S)/2)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
# coding:utf-8

import sys
import math
import time
import numpy as np
import collections
from collections import deque
import queue
import copy

# 最大公約数
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x%y == 0:
    return y
  else:
    while x%y != 0:
      z = x%y
      x = y
      y = z
    else:
      return z

# 幅優先探索(BFS)でスタート座標(x, y)からの最大距離返す
def bfs(SS, x, y, H, W):#入力(座標系(迷路), x, y, xの端, yの端)
  x_next = [0, 0, -1, 1]
  y_next = [1, -1, 0, 0]
  tempx = x
  tempy = y
  mlength = 0
  q = deque()
  xytuple = (x, y, 0)
  q.append(xytuple)


  while q:
    xytuple = q.popleft()
    SS[xytuple[0]][xytuple[1]] = "x" #探索した場所は探索できないようにする
    for i in range(4): #このforで上下左右を調べてる
      tempx = xytuple[0] + x_next[i]
      tempy = xytuple[1] + y_next[i]
      #print(tempx, tempy, xytuple[2])
      #print(S)
      if(0 <= tempx and tempx < H and 0 <= tempy and tempy < W and SS[tempx][tempy] == "."):
        temptuple = (tempx, tempy, xytuple[2]+1)
        SS[temptuple[0]][temptuple[1]] = "x" #探索した場所は探索できないようにする
        mlength = max(mlength, xytuple[2] +1)
        q.append(temptuple)
      #print(q)
  return mlength


#X = str(input()).split()
S = str(input())
s = []
#a = int(A[0])
# S = [[0 for i in range(W)] for j in range(H)]
cont=0


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

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

#print(S)
#S[2] = "a"
print(cont)



#print(ans)

Submission status: Accepted

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

L = len(S)

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:

import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop


#read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)


S = input()
l = len(S) - 1
h = len(S) // 2
ans = 0

for i in range(h):
    if S[i] == S[l-i]:
        continue

    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
left, right = s[:len(s)//2], s[(len(s) + 1)//2:]
print(sum(map(lambda v: v[0] != v[1], zip(left, right[::-1]))))

Submission status: Accepted

Solution code:
#Coding:Utf-8

S=str(input())
hug=0

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

print(hug)

Submission status: Accepted

Solution code:
S = input()

l,r = 0, len(S)-1

cnt = 0
while l<r:
  if S[l] != S[r]:
    cnt += 1
  l += 1
  r -= 1
  
print(cnt)

Submission status: Accepted

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

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:
def t(s):
    a = s[:int(len(s)/2)]
    b = s[::-1][:int(len(s)/2)]
    c = 0
    for i in range(len(a)):
        if a[i] != b[i]:
            c += 1
    return c


if __name__ == '__main__':
    print(t(input()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i=0
s=0
for i in range(num//2):
    if S[i] == S[num-i-1]:
      s=s 
    else:
      s=s+1
i=i+1        

print (s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

S=list(input())
count=0
n,m=math.floor(len(S)/2),math.ceil(len(S)/2)
S1,S2=S[0:n],S[:m-1:-1]

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def ABC147B():
    S = input()
    length = len(S)
    cnt = 0
    for i in range(length // 2):
        if S[i] != S[-1 * (i + 1)]:
            cnt += 1
    print(cnt)

ABC147B()

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 += 1

print(count)

Submission status: Accepted

Solution code:
S = input()


def count(s1, s2):
    res = 0
    for t1, t2 in zip(s1, s2):
        if t1 != t2:
            res += 1

    return res


res = 0
lenS = len(S)
if lenS > 1:
    if lenS % 2 == 0:
        s1, s2 = S[lenS//2:], S[:lenS//2][::-1]
        res = count(s1, s2)
    else:
        s1, s2 = S[lenS//2:], S[:lenS//2+1][::-1]
        res = count(s1, s2)

print(res)

Submission status: Accepted

Solution code:
S = input()

N = len(S)

print([e1 != e2 for e1,e2 in zip(S[0:int(N/2)],S[N:int(N/2)-1:-1])].count(True))

Submission status: Accepted

Solution code:
S = input()
fi = 0
bi = len(S)-1
count = 0
while fi < bi:
    if S[fi] != S[bi]:
        count += 1
    fi += 1
    bi -= 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
l1 = []
for x in s:
    l1.append(x)
l2 = l1[:]
l2.reverse()
hugs = 0
for count in range(int(len(l1)/2)):
    if l1[count] == l2[count]:
        continue
    else:
        hugs += 1
print(hugs)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

n = (len(s)+1)//2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

i = 0
for x in range(len(s)):
    rev = int(len(s) - 1 - x)
    if x >= (len(s) / 2):
        break
    if s[x] != s[rev]:
        i += 1

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

r.reverse()

ans = 0
for _l, _r in zip(l, r):
    if _l != _r:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

n = len(s)
if (n % 2 == 1):
   s.pop(int(n/2))

n = int(len(s)/2)
x = s[:n]
y = s[n:]
y = y[::-1]
print(len([1 for i in range(n) if x[i] != y[i]]))

Submission status: Accepted

Solution code:
s = input()

i = 1
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
S=str(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:
S = input()
N = len(S)
n = N // 2
A = 0

if N % 2 == 0:
  T = S[:n]
  U = S[:n-1:-1]
else:
  T = S[:n]
  U = S[:n:-1]
for i in range(n):
  if T[i] != U[i]:
    A += 1
print(A)

Submission status: Accepted

Solution code:
s=input()
print(sum(i!=j for i,j in zip(s,s[::-1]))//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 += 1
print(count)

Submission status: Accepted

Solution code:
s = input()

cnt=0
mid=len(s)//2;k=0
for i,j in zip(s,reversed(s)):
	if k==mid:
		break
	if i!=j:
		cnt+=1
	k+=1

print(cnt)

Submission status: Accepted

Solution code:
import math

s = input()

left = s[:len(s) // 2]
right = s[-math.floor(len(s) / 2):][::-1]

ct = 0
for i in range(len(left)):
    if left[i] != right[i]: ct += 1

print(ct)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()


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

Submission status: Accepted

Solution code:
s = str(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:
a = input()
A = len(a)
b = a[::-1]
b = b[:len(a)//2]
a = a[:len(a)//2]
res = 0
for i in range(A//2):

	if a[i] != b[i]:res+=1
print(res)

Submission status: Accepted

Solution code:
s = input()

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

print(ans//2)

Submission status: Accepted

Solution code:
import sys
 
def main():
  S = list(input())
  
  sum = 0
  for i in range(0,int(len(S)//2)):
    if S[i]!=S[len(S)-i-1]:
    	sum+=1
               
  print(sum)
               
main()

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 = input()
ans = 0
for i in range(len(S)):
    if S[i]==S[len(S)-1-i]:
        pass
    else:
        ans += 1

print(ans//2)

Submission status: Accepted

Solution code:
s = input()

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

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

print(ans)

Submission status: Accepted

Solution code:
S = input()
l = len(list(S)) // 2
form = list(S[:l])
las = list(reversed(list(S[l:])))

count = 0
for i, e in enumerate(form):
    if las[i] != e:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
hurf = len(s) // 2
before = s[:hurf]
after = "".join(list(reversed(s[hurf+len(s)%2:])))

diff_count = 0

for i in range(len(before)):
  if before[i] != after[i]:
    diff_count += 1
    
print(diff_count)

Submission status: Accepted

Solution code:
def main():
    S = input()

    result = 0

    lenS = len(S)

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

    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()

count=0
while len(a) > 1:
  if a[0] != a[-1]:
    count+=1
  a=a[1:-1]

print(count)