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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
S=str(input())
count = 0
for i in range(len(S)):
  if S[i]!=S[len(S)-1-i]:
    count = count+1
print('{:.0f}'.format(count/2))

Submission status: Accepted

Solution code:
S=input()

l=[]
i=0
if len(S)%2==0:
    for n in range(len(S)//2):
        l.append(S[n])
    for n in range(len(S)//2,len(S)):
        a=l.pop()
        if S[n]!=a:
            i+=1
    print(i)

else:
    for n in range(len(S)//2):
        l.append(S[n])
    for n in range(len(S)//2+1,len(S)):
        a=l.pop()
        if S[n]!=a:
            i+=1
    print(i)

Submission status: Accepted

Solution code:
s = input()
hug = 0
if len(s) % 2 == 0:
  # 回文にするために必要な文字数をカウントする＝s/2の文字列まで0からとmaxlengthから一致するか調べる
  for i in range(len(s) // 2):
    if s[i] != s[len(s) - 1 - i]:
     # print(s[i], s[len(s) - 1 - i])
      hug += 1
else:
  # 回文にするために必要な文字数をカウントする＝s-1/2の文字列まで0からとmaxlengthから一致するか調べる
  for i in range(len(s) // 2):
    if s[i] != s[len(s) - 1 - i]:
      #print(i, s[i], s[len(s) - 1 - i])
      hug += 1
print(hug)

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
    else:
        pass
print(count)

Submission status: Accepted

Solution code:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def SR(): return sys.stdin.readline().rstrip()

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))


s=input()

change=len(s)//2
ans=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

l = len(S) // 2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    s = input().rstrip()
    res = 0
    ss = s[::-1]
    for i in range(len(s)):
        if s[i] != ss[i]:
            res += 1
    print(res//2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    s = input().rstrip()
    r = len(s)
    res = 0
    for i in range(r//2):
        if s[i] != s[-(i+1)]:
            res += 1
    print(res)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()
a = len(S)
A = a // 2
T = S[::-1]
B = S[0:A]
C = T[0:A]

x = 0
count = 0
for b in B:
    if b != C[x]:
        count += 1
    x += 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
    else:
        continue
print(count)

Submission status: Accepted

Solution code:
S = input()

length = len(S)
count = 0

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

count = count // 2

print(count)

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
s=str(input())

h=int(len(s)/2)

cnt=0

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# redcoder
s = list(input())

former = s[:(len(s)//2)]
latter = s[(len(s)-len(s)//2):]
latter.reverse()

print(sum([former[i]!=latter[i] for i in range(len(former))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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()
S_list = [i for i in S] # Sをリストに変換
S_rev =S_list[::-1]

# listと rev比較して違う部分の数
count =0
for i in range(len(S)):
    if S_list[i] != S_rev[i]:
        count += 1
        
print(count//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from fractions import gcd                    # for Python3.4.3


def main():
    mod = 10000007                  # 10^9+7
    inf = float('inf')
    input = sys.stdin.readline      # 改行文字が残ることに注意
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def ii():  return int(input())
    def mi():  return map(int, input().rstrip().split())
    def lmi(): return list(map(int, input().rstrip().split()))
    def li():  return list(input().rstrip())
    
    
    s = input().rstrip()
    count = 0
    for i in range(len(s)//2):
        if s[i]!=s[len(s)-1-i]:
            count += 1
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

half_len = len(S) // 2

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

print(count)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

b=list(reversed(a))

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

print(-(-count//2))

Submission status: Accepted

Solution code:
S = input()

half = int(len(S) / 2)
S1 = S[:half]
S2 = S[::-1][:half]

count = 0
for s1, s2 in zip(S1, S2):
    if s1 != s2: count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A = iss()
    print(sum(A[i] != A[-i - 1] for i in range(len(A) // 2)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A = iss()
    l, r = A[:len(A) // 2], A[len(A) // 2:]
    r = r[::-1]
    ans = 0
    for n in range(len(l)):
        if l[n] != r[n]:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()
rS = "".join([S[-i] for i in range(1,len(S)+1) ])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


def main():
    S = input().rstrip()
    length = len(S)
    S_left = S[:length // 2]
    S_right = S[length // 2:][::-1]

    if S_left == S_right:
        print(0)
        exit()
    else:
        counter = 0
        for i in range(len(S_left)):
            if S_left[i] != S_right[i]:
                counter += 1
        print(counter)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a= input()
length=math.floor(len(a)/2)
count = 0
for i in range(length):
    if a[i] is not a[-1*i -1]:
        count += 1
        
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=list(input());c=i=0
while i<len(S):c+=1*(S[i]!=S[-i-1]);i+=1
print(c//2)

Submission status: Accepted

Solution code:
def kai(a):
    return a==a[::-1]
s=input()
x=0
if kai(s)==False:
    for i in range(len(s)//2):
        if s[i]!=s[-1-i]:
            x+=1
            for j in range(25):
                s[i]==chr(97+j)
print(x)

Submission status: Accepted

Solution code:
def kai(a):
    return a==a[::-1]
s=input()
x=0
if kai(s)==False:
    for i in range(len(s)):
        if s[i]!=s[-1-i]:
            x+=1
            for j in range(25):
                s[i]==chr(97+j)
                if s==s[::-1]:
                    break
print(x//2)

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    S = input()
    Sr = S[::-1]

    count = 0

    for s1, s2 in zip(S, Sr):
        if s1 != s2:
            count += 1
    
    print(count // 2)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
s = str(input())

length = len(s)
length //= 2

count = 0

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

Submission status: Accepted

Solution code:
s = list(input())

n = list(reversed(s))

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    l=len(s)
    ct=0
    for i in range(l//2):
        if s[i]!=s[-1-i]:
            ct+=1
    print(ct)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S= input()

count=0
N=len(S)

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

Submission status: Accepted

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

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:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = np.array(list(sr()))
length = len(S)
answer = np.count_nonzero(S[:length//2] != S[::-1][:length//2])
print(answer)

Submission status: Accepted

Solution code:
s = list(input())

t = list(reversed(s))

x = 0

for i in range(len(s)):
    if s == list(reversed(s)):
        break

    if s[i] != t[i]:
        s[i] = t[i]
        x += 1
        
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
N = len(S)
# print(S)

if N % 2 == 0:
    div = int(N / 2)
else:
    div = int(N // 2)

# print(type(div),div)
S_pic = S[:div]
S_rev = list(reversed(S[div:]))

# print(S_pic)
# print(S_rev)

count = 0
for i in range(div):
    if S_pic[i] != S_rev[i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = list(input())
s_len = len(s)
ans = 0
if s_len % 2 == 0:
  for i, j in zip(s[0 : (s_len // 2 )], reversed(s[(s_len // 2) : s_len + 1])):
    if i != j:
      ans += 1
else:
  for i, j in zip(s[0 : (s_len // 2  )], reversed(s[(s_len // 2 + 1) : s_len])):
    if i != j:
      ans += 1
print(ans)

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=input()
print(sum(a!=b for a,b in zip(S,S[::-1]))//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

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

cnt = 0

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

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

print(ans)

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

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

n = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
n = len(a)
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

M=N//2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC147.B
S = input()
n = len(S)
count =0
if n%2==1:
    S1 = S[:n//2]
    S2 = S[((n+3)//2)-1:][::-1]
    for i in range(n//2):
        if S1[i]!=S2[i]:
            count +=1
elif n%2 ==0:
    S1 = S[:n//2]
    S2 = S[n//2:][::-1]
    for i in range(n//2):
        if S[i]!=S2[i]:
            count+=1
print(count)

Submission status: Accepted

Solution code:
S = input()
ans = 0

for a, b in zip(S, S[::-1]):
    if a != b:
        ans += 1
print(ans // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

out = out // 2
#if out % 2 == 1:
#  out == out // 2 + 1
#else:
#  out == out // 2 
print(out)

Submission status: Accepted

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

Submission status: Accepted

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

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()
mid_e = int(len(s) / 2)
if len(s) % 2 == 0:
    mid_s = mid_e - 1
else:
    mid_s = mid_e
first = s[:mid_e]
second = s[len(s):mid_s:-1]
count = 0
for i in range(len(first)):
    if first[i] != second[i]:
        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()

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

print(cnt)

Submission status: Accepted

Solution code:
import math

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

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()
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:
s = input()
l = len(s)
c = 0

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

print(c)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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(ans//2)

Submission status: Accepted

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

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

left_S = S[:int(N // 2)]
right_S = S[int((N + 1) // 2):]

right_S = ''.join(list(reversed(right_S)))

count = 0

for i in range(len(left_S)):
    if left_S[i] != right_S[i]:
        count += 1
        
print(count)

Submission status: Accepted

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