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


if __name__ == "__main__":
    import sys
    for line in sys.stdin:
        text = line.strip("\n")

    print(solve(text))

Submission status: Accepted

Solution code:
w = input()
wr = w[::-1]

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

Submission status: Accepted

Solution code:
S = input()

l = len(S)
half_l = l // 2

hugs = 0
for i, s in enumerate(S[0:half_l]):
    if s != S[l - 1 - i]:
        hugs += 1

print(hugs)

Submission status: Accepted

Solution code:

import sys
import math
def resolve():
    S=input().rstrip()
    c=0
    for i in range((len(S)//2)):
        if(S[i]!=S[-i-1]):
            c+=1
    print(c)

from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """redcoder"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """vvvvvv"""
        output = """0"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """abcdabc"""
        output = """2"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

Solution code:

import sys
import math
def resolve():
    S=list(input().rstrip())
    c=0
    for i in range(math.floor(len(S)/2)):
        if(S[i]!=S[len(S)-i-1]):
            c+=1
    print(c)

from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """redcoder"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """vvvvvv"""
        output = """0"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """abcdabc"""
        output = """2"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

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

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

print(C)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


s = 0
e = len(a)

cnt = 0
for i in range(e):
	e_i = e - i - 1

	if (a[i] != a[e_i]):
		a = a[:i] + a[e_i] + a[i+1:]
		cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
str_list = list(input())
c = 0

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

Solution code:
a = input()
leng = len(a)
list(a)
time = 0

if leng % 2 == 0:
    for i in range(int(leng / 2)):
        if a[i] != a[-i - 1]:
            time += 1
else:
    for i in range(round(leng/ 2)):
        if a[i] != a[-i - 1]:
            time += 1

print(time)

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

count =0

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

print(count)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
import sys
import functools
import operator

def main():
   s = sys.stdin.readline().strip()
   h = int(len(s) / 2)
   n = functools.reduce(operator.add, map(lambda x: 0 if(s[x] == s[-1-x]) else 1, range(0, h)), 0)
   print(n)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
import sys
s = input()
n = 0
l = len(s)
for i in range(l):
  j = l-i-1
  if i>=j:
    print(n)
    exit(0)
  if s[i]!=s[j]:
    n = n+1
print(n)
exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cap_list = list(input())
turn = len(cap_list) / 2
counter = 0
for i in range(len(cap_list)):
    if i >= turn:
        break
    if cap_list[i] != cap_list[-(i + 1)]:
        counter += 1
print(counter)

Submission status: Accepted

Solution code:
def main():
    try:
        S = input()
        cnt = 0
        for i in range(len(S)//2):
            if S[i] != S[-(i+1)]:
                cnt += 1
        print(cnt)
    except SystemExit:
        pass
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

count = 0

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

Submission status: Accepted

Solution code:
S = list(input())

count = 0

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

Submission status: Accepted

Solution code:
s = input()
slen = len(s)
fs = ""
bs = ""
a = 0

if slen%2==1:
    fs = s[0:(slen//2)+1]
    bs = (s[::-1])[0:(slen//2)+1]

else:
    fs = s[0:(slen//2)]
    bs = (s[::-1])[0:(slen//2)]

for f,b in zip(fs,bs):
    if f != b:
        a += 1

print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

rev = s[::-1]

cnt = 0
for se, reve in zip(s, rev):
    if se != reve:
        cnt += 1

cnt //= 2
print(cnt)

Submission status: Accepted

Solution code:
s = input()
count = 0

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

Submission status: Accepted

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

br = 0

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

print(br//2)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=input()
n=len(a)
li=list(a)
b=0
for k in range(0,n//2):
    if not li[k]==li[n-1-k]:
        b=b+1

print(b)

Submission status: Accepted

Solution code:
s = input()

n = len(s)//2

j = len(s) - 1

ans = 0



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

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
a = stdin.readline().rstrip()
a = list(str(a))
cnt = 0
e = 0
if len(a)%2 == 0:
	end = len(a)//2 
else:
	end = len(a)//2 +1

for s,t in zip(a,a[::-1]):
	cnt +=1
	if s != t:
		e += 1
	if cnt == end:
		break

                   
print(e)

Submission status: Accepted

Solution code:
ch = input()
chlen = len(ch)
num = 0

for i in range(int(chlen/2)):
  if(ch[i] != ch[chlen-i-1]):
    num+=1
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ls = list(input())

c = len(ls)
c = int(c/2+0.5)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())

l = len(s)//2

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

print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

list1=str(input())
b=len(list1)
i=0
counter=0
while b/2>i:
    if list1[i]!=list1[b-1-i]:
        counter+=1
    i+=1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
l = len(s)
ans = 0
i = 1
j = 0
if l%2 == 0:
	while(i <= l/2):
		if s[j] != s[-i]:
			ans += 1
		j+=1
		i+=1
else:
	max = l/2
	while(j < max):
		if s[j] != s[-i]:
			ans += 1
		j+=1
		i+=1
			
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = [x for x in 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()

#print(S)

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

Submission status: Accepted

Solution code:
import numpy as np

S=input()

half_a=''
half_b=''

if len(S)%2==0:
    half_a=np.array(list(S[int(len(S)/2):]))
    half_b=np.array(list(S[:int(len(S)/2)][::-1]))
    
if len(S)%2==1:
    half_a=np.array(list(S[int(len(S)/2)+1:]))
    half_b=np.array(list(S[:int(len(S)/2)][::-1]))


print(np.sum(half_a!=half_b))

Submission status: Accepted

Solution code:
a = str(input())
ans = 0

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

Submission status: Accepted

Solution code:
S =input()
#print(S)
#文字数をカウントする。
#print(len(S))
count = 0
#文頭と文末の文字を比べる。
#同じであれば次の文字へ移行。
for i in range(len(S)//2):
  if S[i] == S[len(S) - i - 1]:
    i = i+1
    #異なる場合、1回カウント。
  else:
    i =i+1
    count = count + 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
parin = input()
counter = 0

for i in range(int(len(parin) // 2)):
    if parin[i] != parin[-i-1]:
        counter += 1
    
print(counter)

Submission status: Accepted

Solution code:
S1 = input()
S2 = S1[::-1]

l = len(S1)
count = 0
for i, j in zip(S1[:l//2], S2[:l//2]):
    if i != j:
        count += 1

print(count)

Submission status: Accepted

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

funct(S)

Submission status: Accepted

Solution code:
import math
def mainFunc( input ):
    letters = list(input)
    ans = 0
    n = math.floor(len(letters) / 2)

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

mainFunc(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
chars = list(s)
count = 0

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = input()
s2 = s1[::-1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()  # 複数の入力値を取得
num = int(len(s) / 2)
j = len(s) - 1
ans = 0
for i in range(num):
    if s[i] != s[i + j]:
         ans += 1
    j -= 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
s = input()

len_s = len(s)

total = 0

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

print(total)

Submission status: Accepted

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

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:
a_str = input()
b_str = a_str[::-1]
c_list= []

for i in range(0,len(a_str)):
    if a_str[i] != b_str[i]:
        c_list.append(a_str[i])

print(int(len(c_list)/2))

Submission status: Accepted

Solution code:
S = input()

if len(S) % 2 == 0:
  sSize = len(S) // 2
else :
  sSize = (len(S)-1) // 2

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

reverse_str = str[::-1]
num_changed = 0
repeat_time = len(str) / 2

i = 0
while i < repeat_time:
    if str[i] != reverse_str[i]:
        num_changed += 1
    i += 1

print(num_changed)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

if len(S)%2 == 0:
    mid = int(len(S)/2)
else:
    mid = int(len(S)/2) + 1

left = S[:mid][::-1]
right = S[-mid:]

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

print(count)

Submission status: Accepted

Solution code:
s = str(input())

cnt = 0

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

print(cnt)

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]:
    pass
  else:
    c +=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()
nhugs = 0

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

print(nhugs)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
l = len(s)
h = l // 2
lis1 = []
lis2 = []
for i in range(0, h):
  lis1.append(s[i])
  lis2.append(s[-(i + 1)])
count = 0
for a, b in zip(lis1, lis2):
  if a != b:
    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[-(i+1)]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
string = input()

left = ""
right = ""

left = string[0:len(string)//2]
right = string[len(string)//2 + 1 if len(string)%2==1 else 0:len(string)]

right = right[::-1]

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

print(count)

Submission status: Accepted

Solution code:
a = input()
count = 0

#文字列を配列にいれている
#奇数の場合、list_beforeの方に多く入る
list_before = []
list_after = []
for i in a:
	if count < len(a)/2:
		list_before.append(i)
	else:
		list_after.append(i)
	count += 1

#print(list_before)
#print(list_after)

l = int(len(a)/2)
count = 0
if len(list_before)-len(list_after) == 1:
	for i in range(l):
		if list_before[i] != list_after[l-1 - i]:
			list_before[i] = list_after[l-1 - i]
			count += 1
else: 
	for i in range(l):
		if list_before[i] != list_after[l-1 - i]:
			list_before[i] = list_after[l-1 - i]
			count += 1
		
#print(list_before)
#print(list_after)

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding:utf-8

s = input()
invs = ''.join(reversed(s))
count = 0
for i in range(len(s)):
    if s[i] != invs[i]:
        count += 1
    else:
        pass
print(count//2)

Submission status: Accepted

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

for i in range(l//2):
  if (s[i] == s[l-1-i]):
    pass
  else:
    reset += 1

print(reset)

Submission status: Accepted

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

Submission status: Accepted

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

sum = 0

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

print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ans = 0
if len(S) % 2 == 0:
    a = S[:len(S) // 2]
    b = S[len(S) // 2:]

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s1 = input()
s2 = s1[::-1]

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

print(int(cnt / 2))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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()
mid = len(s) // 2
pre = s[:mid]
if len(s) % 2 == 0:
    aft = s[mid:]
    aft = aft[::-1]
else:
    aft = s[mid+1:]
    aft = aft[::-1]

dif = 0
for i in range(len(pre)):
    if pre[i] != aft[i]:
        dif += 1

print(dif)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = len(S)
# 端と端から同じものに合わせていく
cou = 0
for i in range(n//2):
    if S[i] != S[n-1-i]:
        S[n-1-i] = S[i]
        cou += 1
    else:
        continue
#print(S)
print(cou)

Submission status: Accepted

Solution code:
from sys import stdin
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
s = str(stdin.readline().rstrip())
l = len(s)//2

count = 0

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

print(count)

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    s = input()
    k = int(len(s) / 2)
    k1 = len(s) - 1
    count = 0
    for i in range(k):
        if s[i] != s[k1-i]:
            count+=1
    print(count)

Submission status: Accepted

Solution code:
S=input()
L=[]
R=[]
count=0
for i in range(len(S)):
    if i<=(len(S)+(2-1))//2-1:
        L.append(S[i])
        R.append(S[-i-1])
for i in range(len(L)):
    if L[i]==R[i]:
        count=count
    else:
        count+=1
print(count)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

N = len(s)
if N%2 == 1:
    harf = N//2
    mae = s[:harf]
    usi = s[harf+1:][::-1]
else:
    harf = N//2
    mae = s[:harf]
    usi = s[harf:][::-1]

ans = 0
for i in range(harf):
    if mae[i] != usi[i]:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = list(input())

if len(k) == 1:
    print(0)
elif len(k) == 2:
    if k[0] == k[1]:
        print(0)
    else:
        print(1)

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

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