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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if l % 2 == 0:
  A = S[:(l//2)]
  B = S[(l//2):]
else:
  A = S[:(l//2)]
  B = S[(l//2+1):]
  
B = B[::-1]
ans = 0
for i in range(l//2):
  if A[i] != B[i]:
    ans += 1
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

S_rev = S[::-1]
total = 0

for i in range(len(S)):
  if S[i] != S_rev[i]:
    total += 1

if total % 2 == 0:
  total = int(total / 2)
else:
  total = int(total / 2) + 1

print(total)

Submission status: Accepted

Solution code:
S = list(input())
front_S = S[:(len(S)//2)]
S.reverse()
back_S=S[:(len(S)//2)]
count = 0
for i,j in zip(front_S,back_S):
    if(i!=j):
        count+=1
print(count)

Submission status: Accepted

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

num = length//2
counter = 0
for i in range(num):
    if not S[i]==S[-i-1]:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
s = input()
s_r = list(reversed(s))
count = 0

for i in range(len(s)):
    if s[i] != s_r[i]:
        count += 1

print(count//2)

Submission status: Accepted

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

Submission status: Accepted

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

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:
S=input()
if len(S)%2==0:
    S_mae=S[:len(S)//2]
    S_ushiro=S[len(S)//2:]
else:
    S_mae=S[:len(S)//2+1]
    S_ushiro=S[len(S)//2:]
ans=0
for i in range(len(S_mae)):
    if S_mae[-i-1]!=S_ushiro[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:
#B
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 = str(input())
n = len(s)
t = s[::-1]
ans = 0
for i in range(n//2):
    if s[i] != t[i]: ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
ans = 0
halfidx = int((len(s)/2))
ary  = s[0:halfidx]
rary = list(reversed(s))[0:halfidx]
for i in range(0,halfidx):
    if (ary[i] != rary[i]):
        ans = ans + 1
print(ans)

Submission status: Accepted

Solution code:
S = input()

SR = S[::-1]
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

l = 0
r = len(s)-1

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

Submission status: Accepted

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


    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=input()
def split(w):
    return [all for all in w]
before=split(X[0:int(len(X)/2)])
after=split(X[int(len(X)/2):])
c=0
ans=0
reverse=-1
if len(X)%2==1:
    after=after[1:]
for i in after:
    if after[c]!=before[reverse]:
        ans+=1
    c+=1
    reverse-=1
print(ans)

Submission status: Accepted

Solution code:
import sys

def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

S = LS2()
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:
import math
s=list(input())
N=len(s)
x=0
for i in range(0,N):
    if s[i]!=s[N-1-i]:
        x+=1
x=math.ceil(x/2)
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 147 B

s = input()
k = s[::-1]
n = 0

for i in range(len(s)):
    if s[i] != k[i]:
        n += 1
        # print(s[i])

print(n // 2)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    S = input()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#<B>
s = input()
a = s[:len(s)//2]
a = a[::-1]
if len(s) % 2 == 0:
    b = s[len(s) // 2:]
else:
    b = s[len(s) // 2 + 1:]

ans = 0
for (x, y) in zip(a, b):
    if x != y:
        ans += 1
print(ans)

Submission status: Accepted

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

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

print(p)

Submission status: Accepted

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

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:
Ss = input().rstrip()

lenS = len(Ss)

ans = 0
for S, T in zip(Ss[:lenS//2], Ss[::-1]):
    ans += S != T

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
my_str = str(input())
new_str = my_str[::-1]
mylist = list(my_str)
newlist = list(new_str)
count = 0

for i in range(0,len(my_str)):
  if mylist[i] == newlist[i]:
    continue
  else:
    count += 1

new_count = -(-count//2)

print(new_count)

Submission status: Accepted

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

Submission status: Accepted

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

main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(str(input()))
length = len(S)
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()
if len(s) == 1:
  print(0)
  exit()
  
ans = 0  
for i in range(len(s)//2):
  if s[i] != s[(-1)*(i+1)]:
    ans += 1
  else:
    pass
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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




if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
s_r = list(reversed(s))
s = s[:len(s)//2]
s_r = s_r[:len(s_r)//2]

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

print(count)

Submission status: Accepted

Solution code:
S=input()
h=len(S)//2
l=S[0:h]
r=S[h:]
Rr=r[::-1]

ans=0

for i in range(h):
    if l[i]==Rr[i]:
        pass
    else:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
S = input()

ans = 0
n = len(S)


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)
if l % 2 == 0:
    s_a = s[:l // 2]
    s_b = ''.join(list(reversed(s[l // 2:])))
else:
    s_a = s[:l // 2]
    s_b = ''.join(list(reversed(s[l // 2 + 1:])))

count = 0
for i in range(len(s_a)):
    if s_a[i] != s_b[i]:
        count += 1
print(count)

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

if len_ % 2 == 0:
    front = s[:half]
    back = s[half:][-1::-1]
    for i in range(len(front)):
        if front[i] != back[i]:
            ans += 1
else:
    front = s[:half]
    back = s[half+1:][-1::-1]
    for i in range(len(front)):
        if front[i] != back[i]:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from collections import defaultdict
ml=lambda:map(float,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())

"""========main code==============="""

s=ip()
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()

iters = len(s) // 2

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


print(count)

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 = c + 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
S = input()

S_r = list(reversed(S))

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

print(hug)

Submission status: Accepted

Solution code:
s = input()
sa = s[:len(s)//2]
if len(s)%2 == 0:
    sb = s[len(s)//2:]
if len(s)%2 == 1:
    sb = s[len(s)//2+1:]

sbr = sb[::-1]
cnt = 0
for i in range(len(sa)):
    if sa[i] != sbr[i]:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
S =input()
a =int(len(S)/ 2)
#print(a)
x =0

#print(S[0:a])
#print(S[a:2*a])


for i in range(a):
    #print(S[i],S[-(i+1)])
    if S[i] != S[-(i+1)]:
        x += 1

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
s = input()
a = s[::-1]
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
count = 0
val = 0

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

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

print(count)

Submission status: Accepted

Solution code:
s = input()
a = ""
b = ""
if len(s)%2==0:
    a = s[:(len(s)//2)]
    b = s[(len(s)//2):][::-1]
else:
    a = s[:(len(s)//2)]
    b = s[(len(s)//2)+1:][::-1]
cnt = 0
for a_, b_ in zip(a,b):
    if not a_ == b_:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
x = input()
a = x[::-1]
b = 0
c = 0
d = int(len(x))
while b + 1 <= d:
  if x[b] == a[b]:
    c = c
    b = b + 1
  else:
    c = c + 1
    b = b + 1
c = int(c/2)
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for i, j in zip(s, t):
  if i != j:
    cnt += 1
    
print(cnt // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
L = len(S) // 2
LS = list(S)

cnt = 0

for i in range(L):
    j = (i * -1) -1
    if LS[i] != LS[j]:
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Palindrome-philia
https://atcoder.jp/contests/abc147/tasks/abc147_b

"""
import sys


def solve(S):
    l, r = 0, len(S) - 1
    ans = 0
    while l < r:
        ans += (S[l] != S[r])
        l += 1
        r -= 1
    return ans


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
S = input()

result = 0
# 入力例1なら3文字目まで
for i in range(len(S) // 2):
  # sの1(2番目)がsの最後尾と一緒ならカウント
  if S[i] != S[-(i + 1)]:
    result += 1
print(result)

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:
N = input()
n = len(N) // 2
x = N[:n]
y = ''.join(list(reversed(N[-n:])))

count = 0
for i in range(n):
    if x[i] == y[i]:
        continue
    else:
        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()
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();print(sum(a>b for a,b in zip(s,s[::-1])))

Submission status: Accepted

Solution code:
N = input()
A = N[::-1]
#print(N)
#print(A)
cont = 0
for i in range(len(N)):
	if N[i] > A[i]:
		cont+=1
print(cont)

Submission status: Accepted

Solution code:
s=input()

l=[]

for i in s:
  l.append(i)
new_l = l[::-1]

count=0
for a,b in zip(l,new_l):
  if a != b:
    count+=1
print(count//2)

Submission status: Accepted

Solution code:
def actual(s):
    N = len(s)
    count_operation = 0

    for i in range(N):
        head = s[i]
        tail = s[N - 1 - i]

        if head != tail:
            count_operation += 1

    return int(count_operation / 2)

s = input()
print(actual(s))

Submission status: Accepted

Solution code:
import numpy as np
import scipy as sp
import math

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

Submission status: Accepted

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

    cnt = 0


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

    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

leng = len(S)
count = 0
if leng % 2 == 0:
  S1 = S[:int(leng/2)]
  S2 = S[int(leng/2):]
  for i in range(int(leng/2)):
    if S1[i] == S2[int(leng/2)-1-i]:
      count += 1
  print(int(leng/2)-count)
else:
  S1 = S[:int(leng/2)]
  S2 = S[int(leng/2)+1:]
  for i in range(int(leng/2)):
    if S1[i] == S2[int(leng/2)-1-i]:
      count += 1
  print(int(leng/2)-count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

S=list(ns())

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(int(l/2)):
  if s[i]!=s[l-i-1]:
    c+=1
print(c)

Submission status: Accepted

Solution code:
s=input()
n=len(s)
if n%2==0:
  t=list(s[:n//2])
  u=list(s[n//2:])
  t.reverse()
  cnt=0
  for i in range(len(t)):
    if t[i]==u[i]:
      continue
      
    else:
      cnt+=1
  
else:
  t=list(s[:n//2])
  u=list(s[n//2+1:])
  t.reverse()
  cnt=0
  for i in range(len(t)):
    if t[i]==u[i]:
      continue
      
    else:
      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[n-i-1]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def palindrome(s):

    ans = 0

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

def main():
    s = list(str(input()))
    print(palindrome(s))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

Sr = S[ : : -1]

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

print((hug + 1) // 2)

Submission status: Accepted

Solution code:

def main1():
    s = input()
    s1 = s[0:len(s)//2]
    s2 = s[::-1]
    s2 = s2[0:len(s)//2]
    ans = 0

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



if __name__ == '__main__':
    main1()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    s = input()
    r = s[::-1]
    l = len(s)
    count = 0
    if l % 2 == 0:
        for i in range(l//2):
            if s[i] != r[i]:
                count += 1
        print(count)
        return
    for i in range(l//2 + 1):
        if s[i] != r[i]:
            count += 1
    print(count)
    

main()

Submission status: Accepted

Solution code:
S = input()
rS = reversed(S)

print(sum([s != rs for s, rs in zip(S, rS)]) // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(x):
  if len(x) <= 1:
    return 0
  else:
    return (1 if x[0] != x[-1] else 0) + solve(x[1:-1])

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**5)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    s = gete()

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

    print(ans)


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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(t)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func(S):
    T = S[::-1]
    ans = sum(1 for s, t in zip (S, T) if s != t) // 2
    return ans


if __name__ == "__main__":
    S = input()
    print(func(S))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
s = input()

rs = s[::-1]

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

print(int(cnt/2))

Submission status: Accepted

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

print(count)