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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ints():
  return [int(x) for x in input().split()]
def readi():
  return int(input())

s = input()

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(S: str):
    sl = list(S)
    rs = sl[::-1]
    
    from math import ceil
    print(ceil([sl[i] != rs[i] for i in range(len(S))].count(True)/2))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# coding: utf-8
def main():
	S = input()
	start=0
	end=len(S) - 1
	cnt=0
	while start<end:
		if S[start] != S[end]:
			cnt += 1
		start += 1
		end -= 1
	print(cnt)


if __name__ == '__main__':
	main()

Submission status: Accepted

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

num_true = sum([S[i] == S[-i-1] for i in range(N)])

print((N-num_true) // 2)

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()
cnt = 0
for s1, s2 in zip(s, s[-1::-1]):
    if s1 != s2:
        cnt += 1
print(cnt//2)

Submission status: Accepted

Solution code:
string = list(input())
len_s = len(string)

string_rev = ""
for i in range(len_s):
    string_rev += string[len_s - 1 - i]
string_rev = list(string_rev)


#print(string)
#print(string_rev)
count = 0
for i in range(len_s):
    if string[i] != string_rev[i]:
        string[i] = string_rev[i]
        string[len_s - 1 - i] = string_rev[len_s - 1 - i]
        #print(string)
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
s = input()

l = len(s)
cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

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

print(cnt)

Submission status: Accepted

Solution code:
N = input()

C = 0

for num in range(int((len(N)//2))):
  if N[num] != N[len(N) - num - 1]:
    C += 1
  
print(C)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
treat = input()

acc = 0
hugs = 0

for i in range(len(treat) // 2):
	if treat[acc] == treat[len(treat) - 1 - acc]:
		acc = acc + 1
	else:
		hugs = hugs + 1
		acc = acc + 1

print(hugs)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if L==1:
  j=0

if L>1:
  w=int(L/2)

  i=0
  j=0
  for i in range(w):
    if S[i:i+1]!=S[L-1-i:L-i]:
      j=j+1
  
print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
text = input()
length = len(text)
hlength = math.floor(length /2)
count = 0
for i in range(hlength):
  if text[i] != text[length - i-1]:
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
print()

len_s = len(S)

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

print(counter)

Submission status: Accepted

Solution code:
S = input()
N = int(len(S)/2)

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

m = -1
s = 0
ans = 0

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
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()
lens = len(S)
ans = 0
if lens % 2:
    #abcde
    mid = (lens//2)+1
    ans = 0
    for i in range(mid):
        if S[i] != S[lens-i-1]:
            ans += 1
    print(ans)
else:
    mid = lens //2
    #abcdef
    for i in range(mid):
        if S[i] != S[lens-1-i]:
            ans += 1
    print(ans)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()

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

print(count)

Submission status: Accepted

Solution code:
a = list(map(str, input()))
a_r = [a[len(a)-1-i] for i in range(len(a))]

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

print(count)

Submission status: Accepted

Solution code:


s=input()
n=len(s)
ans=0
for i in range(n):
    j=n-1-i
    if(i>=j):
        break
    if( s[i]!=s[j]):
        ans+=1
    #print(i,ans)
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

S=input()
n=len(S)
q=0
for i in range(n):
    if S[i]!=S[n-i-1]:
        q+=1
print("{}".format(q//2))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(S: str):
    counter = 0
    for c1, c2 in zip(S, S[::-1]):
        if c1 != c2:
            counter += 1
    print(counter//2)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=input()
b=len(a)
i=0
j=0
while i <= b//2-1 :
	if a[i] != a[b-i-1]: 
		j+=1
		i+=1
	else:
		i+=1
print(j)

Submission status: Accepted

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

l = list(s)

for i in range(z):
  if l[i] != l[n-i-1]:
    count = 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:
# -*- coding:utf-8 -*-

def solve():
    S = input()
    ans = 0
    left = 0
    right = len(S)-1
    while left <= right:
        if S[left] != S[right]:
            ans += 1
        left += 1
        right -= 1
    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
S = input()
S_len = len(S)
x = 0

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

print(x)

Submission status: Accepted

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

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

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

x = len(S)//2
S_1 = S[:x]
S_2 = S[x:]
S_3 = S_2[::-1]

cont = 0
for i in range(x):
  if S_1[i] != S_3[i]:
    cont += 1
print(cont)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

s = input()

list(s)


isNotKaibun = 0

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

for num in range(c):
    if s[num] == s[-(num+1)]:
#        print("--YES--")
#        print(s[num])
#        print(s[-(num+1)])
        pass
    else:
        isNotKaibun += 1
#        print("--NO--")
#        print(s[num])
#        print(s[-(num+1)])

print(isNotKaibun)

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:
A = input()
half = int(len(A)/2)
A_reversed = list(reversed(A))
count = 0
for x in range(half):
    if(A[x]!=A_reversed[x]):
        #print(A[x],A_reversed[x])
        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()
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 numpy as np
# import scipy as sp

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

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

Submission status: Accepted

Solution code:
S = input()

half_length = int(len(S) / 2)
cnt = 0
front = []
back = []

if len(S) % 2 == 0:
    front = list(S[ 0 : half_length ])
    back = list((S[ half_length : len(S)]))
else:
    front = list((S[ 0 : int(len(S) / 2) ]))
    back = list((S[ int(len(S) / 2) + 1 : len(S)]))


back.reverse()

for i in range(len(front)):
    if front[i] != back[i]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
targetS = list(input())
targetS_r = list(reversed(targetS))
targetS_1 = []
targetS_2 = []
for target_list in range(int(len(targetS) / 2)):
    targetS_1.append(targetS[target_list])
    targetS_2.append(targetS_r[target_list])
count = 0
for target_list in range(int(len(targetS_1))):
    if targetS_1[target_list] != targetS_2[target_list]:
        count = count + 1
print(count)

Submission status: Accepted

Solution code:
import math

s = input()
n = math.floor(len(s) / 2)
c = 0

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

Submission status: Accepted

Solution code:
S = input()
n1 = len(S)
n2 = round(n1 / 2)

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = str(input())
x = len(s)
tmp = 0

if x%2 != 0:
    for i in range((x-1)//2):
        if s[i] != s[x-i-1]:
            tmp += 1

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

print(tmp)

Submission status: Accepted

Solution code:
s=list(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:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

s = input()

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

Submission status: Accepted

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = 0

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

Submission status: Accepted

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

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:
S= input()
i = 0
flag = 0
while len(S)-1-i*2>0:
    if S[i] != S[len(S) - i-1]:
        flag +=1
    i+=1

print(flag)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


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

    return t


print(main())

Submission status: Accepted

Solution code:
str = input()

ans = 0
for i in range(len(str)):
    if (i >= int(len(str)/2)):
        break

    if str[i] != str[len(str)-i-1]:
        ans += 1

print (ans)

Submission status: Accepted

Solution code:
S = input()
if S.islower():
  S1 = S[:int(len(S)/2)]
  S2 = S[int(len(S)/2):]
  count = 0
  for i,x in enumerate(S1):
    if x != S2[(i+1)*-1]:
      count += 1
  print(count)

Submission status: Accepted

Solution code:
S = input().strip()
R = S[::-1]

ans = 0
for s, r in zip(S, R):
    if s != r:
        ans += 1

print(ans//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# get a string
s = raw_input()

if len(s) % 2 == 0:
    i, j = len(s)/2-1, len(s)/2
else:
    i, j = len(s)/2-1, len(s)/2 + 1 

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

print ans

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
l = len(s)
result = 0
n = 0
while n < l/2:
  if s[n] != s[(l-n)-1]:
    result += 1
    n += 1
  else:
    n += 1
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
S = input()

ret = 0

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

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:
a = input()
 
count = 0
 
for i in range(len(a)//2):
    if a[i] is not a[-i-1]:
        count += 1
 
print(count)

Submission status: Accepted

Solution code:
a = input()

count = 0

for i in range(len(a)//2):
    if a[i] is not a[-i-1]:
        count += 1

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
s = (input())

n = len(s)
if n % 2 == 0:
    s1 = [x for x in s[0:(int(n/2))]]
    s2 = [x for x in s[(int(n/2)):n]]
    #print(s1)
    #print(s2)

    num = 0
    for i in range(int(n/2)):
        #print(s1[i])
        #print(s2[int(n/2)-i-1])
        if s1[i] != s2[int(n/2)-i-1]:
            num += 1
    print(num)
else:
    s1 = [x for x in s[0:(int((n-1)/2))]]
    s2 = [x for x in s[(int((n+1)/2)):n]]

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

Submission status: Accepted

Solution code:
s = input()
s_list = list(s)
n = len(s)
ans =0
for i in range(n-1):
    if s_list[i] != s_list[-1-i]:
        s_list[-1-i]=s_list[i]
        ans+=1
s2 = "".join(s_list)
#print(s2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    l = input()
    givenLen = len(l)
    if l==l[::-1]:
        return 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S = input()
l = len(S)
count = 0
if len(S)%2 == 1:
    #print("here")
    for i in range(int(len(S)/2)):
        #print(S[i], S[l-i-2])
        if S[i] != S[l-i-2]:
            count += 1
else:
    for i in range(int((len(S)-1)/2)):
        #print(S[i], S[l-i-2])
        if S[i] != S[l-i-2]:
            count += 1

print(count)

Submission status: Accepted

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

print(res)

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

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

rev_S = S[::-1]

count = 0
for s, r in zip(S, rev_S):
    if s != r:
        count += 1
print(count//2)

Submission status: Accepted

Solution code:
input = input()

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

Submission status: Accepted

Solution code:
input = input()

count = 0
s1 = ''
s2 = ''
if len(input) % 2 == 0:
  s1 = list(input[:len(input)//2])
  s2 = list(reversed(input[len(input)//2:]))
elif len(input) % 2 == 1:
  s1 = list(input[:len(input)//2])
  s2 = list(reversed(input[len(input)//2+1:]))

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

Submission status: Accepted

Solution code:
s = input()
length = len(s)
s_left = s[:length//2]
s_right = s[(length+1)//2:][::-1]
print(sum([x != y for x, y in zip(s_left, s_right)]))

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

for i in range(0, len(s)//2):

    if s[i] != sr[i]:
        cnt += 1
    else:
        pass

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

length=len(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
a = input()
print(len(list(filter(lambda x: x[0] != x[1], zip(a[:len(a)//2], a[:(len(a)-1)//2:-1])))))

Submission status: Accepted

Solution code:
####入力####

s = input() #文字列
n =len(s)

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


print(count)

Submission status: Accepted

Solution code:
def hug_counter(kaibun):
    global REQUIRED_HUG_COUNT
    if len(kaibun) < 1:
        return
    if kaibun[0] != kaibun[-1]:
        REQUIRED_HUG_COUNT += 1
    kaibun = kaibun[1:-1]
    hug_counter(kaibun)
        
REQUIRED_HUG_COUNT = 0
S = input()
hug_counter(S)
print(REQUIRED_HUG_COUNT)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
word=input()
word_rev=word[::-1]
cnt=0

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

Submission status: Accepted

Solution code:
s = list(input())
#sが回文であるかを判定する
front =[]
rear =[]
mid = int(len(s)/2)
ans = 0
#sの文字列の長さが偶数だった場合
if(len(s)%2 == 0):
    for i in range(len(s)//2):
        a = s.pop(0)
        front.append(a)
    rear = s
    for i in range(len(front)):
        if(front[i] != rear[len(rear)-1-i]):
            ans += 1
#sの文字列の長さが奇数の場合
else:
    dead = s.pop(mid)
    for i in range(len(s)//2):
        a = s.pop(0)
        front.append(a)
    rear = s
    for i in range(len(front)):
        if(front[i] != rear[len(rear)-1-i]):
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
mid = len(s)//2
ans = 0
s_ = []
for i in range(len(s)-1,mid-1,-1):
    s_ += s[i]
s_ = ''.join(map(str,s_))
for i in range(mid):
    if s_[i] != s[i]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()

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

print(res)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

s = input()

len_s = len(s)
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:
a = input()
b = list(a)
count = len(b)
count2 = count//2
n = 0
for i in range(count2):    
    if b[i] == b[count-i-1]:
        n = n
    else:
        n += 1

print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)