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

Submission status: Accepted

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

Submission status: Accepted

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


def read():
    S = input().strip()
    return S,


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


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
n=len(s)
a=0
b=n-1
ans=0
while b-a>=1:
  if s[a]!=s[b]:
    ans+=1
  a+=1
  b+=-1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

s = input()

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

Submission status: Accepted

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

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
input = sys.stdin.readline

s = list(input())

a = 0

#print(len(s))

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

print(a)

Submission status: Accepted

Solution code:
s = input()
hug = 0

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

print(hug)

Submission status: Accepted

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

print(cnt)

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

Submission status: Accepted

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

    i = i+1
    j = j-1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

n=len(s)

num=n//2
count=0

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

Submission status: Accepted

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

Submission status: Accepted

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

if N % 2 == 0:
    m = int(N/2)
    LS = S[:m]
    RS = S[N:m-1:-1]
    ans = 0
    for i in range(m):
        if LS[i] == RS[i]:
            pass
        else:
            ans += 1
else:
    m = int((N+1)/2)
    LS = S[:m-1]
    RS = S[N:m-1:-1]
    ans = 0
    for i in range(m-1):
        if LS[i] == RS[i]:
            pass
        else:
            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[N-i-1]:
    res += 1
    
print(res)

Submission status: Accepted

Solution code:
S = input()

length = len(S)
leng = int(length/2)
cnt = 0

for i in range(leng):
    if S[i] == S[length-(i+1)]:
        continue
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

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

    cnt = 0
    for s_, t_ in zip(S, T):
        if s_ != t_:
            cnt += 1

    cnt //= 2

    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s = input()
print(sum(t != u for t, u in zip(s[:len(s)//2], s[::-1])))

Submission status: Accepted

Solution code:
s = input()
count=0
n=len(s)//2

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

Submission status: Accepted

Solution code:
S = input()

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import product, combinations,permutations
from copy import deepcopy
import sys
sys.setrecursionlimit(4100000)



if __name__ == '__main__':
    S = input()
    mid = len(S)//2

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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()
n = len(s)
print(sum(t != u for t, u in zip(s[:n//2], s[::-1])))

Submission status: Accepted

Solution code:
s = input()
n = len(s)
print(sum(t != u for t, u in zip(s[:n//2], s[-(-n//2):][::-1])))

Submission status: Accepted

Solution code:
s = input()

if len(s) == 1:
  print(0)
  exit()

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
a=input()
b=a[::-1]
count=0


for i in range(len(a)):
  if a[i]!=b[i]:
    count+=1
else:
  print(int(count/2))

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

Solution code:
# abc147_b.py
# https://atcoder.jp/contests/abc147/tasks/abc147_b

# B - Palindrome-philia /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# 高八士君は回文が大好きで、回文でない文字列が許せません。
# 高八士君は文字列を 1回ハグするごとに、文字列から 1文字を選んで任意の文字に変えることができます。
# 文字列 Sが与えられます。Sを回文にするために必要なハグの最小回数を答えてください。

# 制約
#     Sは半角英小文字のみから成る文字列
#     Sの長さは 1 以上 100以下

# 入力
# 入力は以下の形式で標準入力から与えられます。
# S

# 出力
# Sを回文にするために必要なハグの最小回数を出力してください。

# 入力例 1
# redcoder

# 出力例 1
# 1

# たとえば、4文字目を o に変えて redooder にすることで回文になります。

# 入力例 2
# vvvvvv

# 出力例 2
# 0

# 一度も文字を変えなくてよい場合もあります。

# 入力例 3
# abcdabc

# 出力例 3
# 2


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[0]
    # N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    # 文字が奇数だったら真ん中の1文字を削る
    q, mod = divmod(len(S), 2)
    if mod != 0:
        S = S[:q] + S[-q:]

    result = 0
    for i in range(q):
        log(f'S[i:i+1]=[{S[i:i+1]}]')
        log(f'S[2*q-i-1:2*q-i]=[{S[2*q-i-1:2*q-i]}]')
        if S[i:i+1] != S[2*q-i-1:2*q-i]:
            result += 1

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['redcoder']
        lines_export = [1]
    if pattern == 2:
        lines_input = ['vvvvvv']
        lines_export = [0]
    if pattern == 3:
        lines_input = ['abcdabc']
        lines_export = [2]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

S_midn = int(len(S) / 2)
S_rev = S[::-1]
count = 0

for i in range(S_midn):
  if S[i] != S_rev[i]:
    count += 1
    
print(count)
#print(S, S_rev, S_midn)

Submission status: Accepted

Solution code:
def resolve():
    S = list(input())
    if len(S)%2 == 0:
        s1, s2 = S[:len(S)//2], S[len(S)//2:]
    else:
        s1, s2 = S[:len(S)//2], S[(len(S)//2)+1:]
    s2.reverse()
    cnt = 0
    for i in range(len(s1)):
        if s1[i] != s2[i]:
            cnt += 1
    print(cnt)


if '__main__' == __name__:
    resolve()

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

k=len(s)

cnt=0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input());print(sum([1 for i,j in list(zip(s[:(len(s)//2)],s[len(s)//2:][::-1])) if i!=j]))

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:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

S = input()
N = len(S)
cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
hag = 0
for i in range(n):
    if i >= n - i - 1:
        break
    elif s[i] != s[n - i - 1]:
        hag += 1

print(hag)

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    S = SS()

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

    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def palindrome_philia():
    # 入力
    S = input()
    # 処理
    # 文字列が奇数
    if len(S) % 2 == 1:
        comp_str_count = int((len(S) + 1) / 2 - 1)
    # 文字列が偶数
    elif len(S) % 2 == 0:
        comp_str_count = int((len(S) + 1) / 2)
    # 集計処理
    hag_count = 0
    for i in range(comp_str_count):
        if S[i] == S[-i-1]:
            pass
        else:
            hag_count += 1
        i += 1
    return hag_count

result = palindrome_philia()
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

s = input()
n = len(s)
cnt = 0

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

print(math.ceil(cnt/2))

Submission status: Accepted

Solution code:
#Good question
import sys
S = input()
if not S.islower(): sys.exit()
if not ( 1 <= len(S) <= 100 ):sys.exit()

pos = int(len(S)/2)

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

Submission status: Accepted

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

count=0
if char%2==0:
    low=(char//2)-1
    high=char//2
else:
    low=char//2
    high=char//2

while low>=0:
    if S[low]!=S[high]:
        count+=1
    low-=1
    high+=1

print(count)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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


print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=str(input())
ans=0
for i in range(len(S)//2):
    if S[i]!=S[-i-1]:#S[-i-1]だと後ろからi番目を出力
        ans=ans+1
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
s  = input()
x = 0

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

print((int(x)))

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

s1=s[:n]
s2=s[-n:]
s2=s2[::-1]

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

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

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
s_reversed = list(reversed(s))
ans = len([(a,b) for a, b in zip(s, s_reversed) if a !=b]) // 2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os, sys, re, math

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()
cnt = 0
for b, a in zip(s, reversed(s)):
	if b != a:
		cnt += 1
print(int(cnt / 2))

Submission status: Accepted

Solution code:
S = input()
N = len(S)
print(sum(map(lambda x: x[0] != x[1], zip(S[:N//2], S[::-1]))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
pvt=int(len(S)/2)
f=S[:pvt]
b=S[pvt:]
b_sort=b[::-1]
ans=0
for i, j in zip(f,b_sort):
    if i != j:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
start, count, end = 0, 0, len(s)-1
while(start < end):
    if (s[start] != s[end]):
        count += 1
        start += 1; end -= 1
    else:
        start += 1; end -= 1
else:
    print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# unihernandez22
# https://atcoder.jp/contests/abc147/tasks/abc147_b
# string manipulation

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())
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 = 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=input()
n=len(s)
s1 = s[0:n//2]
s2 = s[n//2:n]
s2 = s2[::-1]

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

print(ans)

Submission status: Accepted

Solution code:
import math

s = input()
ret = 0

s_len = len(s)
count = (int)(math.floor(s_len/2))
for i in range(count):
    if s[i] !=  s[s_len-i-1]:
        ret += 1

print("{}".format(ret))

Submission status: Accepted

Solution code:
S_list = list(input())

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
s = input()
n = len(s) // 2
j = -1
t = 0

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

print(t)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
n = -(-(len(s) - 1) // 2)
print(sum(i != j for i, j in zip(s[:n], s[-n:][::-1])))

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

Submission status: Accepted

Solution code:
s = input()
ans = 0
center = len(s) // 2

if len(s) % 2 == 1:
  s2 = s[center+1:]
else:
  s2 = s[center:]

s1 = s[:center]
s2 = "".join(reversed(s2))
for str1 , str2 in zip(s1,s2):
  if str1 != str2:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

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

    print(ans)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
cnt = 0

for i in range(len(S)):
    j = len(S) - i - 1
    if S[i] != S[j] and i < j:
        cnt += 1
        
print(cnt)

Submission status: Accepted

Solution code:
s=list(input())
sr=s[::-1]
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()
s_rev = s[::-1]

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