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:
#%%
import sys
def input():
    return sys.stdin.readline().rstrip()

def main():
    S=input()

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


# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc147","b",main)

Submission status: Accepted

Solution code:
s=input()
s_f=""
s_l=""
cnt=0
n=len(s)
m=int(n/2)
if n%2==0:
    s_f=s[:m]
    s_l=s[m:]
else:
    s_f=s[:m]
    s_l=s[m+1:]
    
s_l=s_l[::-1] 

for i in range(m):
    if s_f[i]!=s_l[i]:
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

counter = 0
i = 0
while i != itr :
    i = i+1
    if S[i-1] != S[-i] :
        counter = counter + 1

print(counter)

Submission status: Accepted

Solution code:
S = input()
reversed_S = S[::-1]
length = len(S)
mid = length // 2
ans = 0

for i, a, b in zip(range(length), S, reversed_S):
    if i == mid:
        break
    if a != b:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
word = input()
half = len(word) // 2

a, b = word[:half], word[half:]
b = ''.join(list(b)[::-1])

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

print(steps)

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

print(ans)

Submission status: Accepted

Solution code:
input1 = input()
S = input1.split()

result = 0


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

print(result)

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

Submission status: Accepted

Solution code:
'''input
10 2
7 6 18 6 16 18 1 17 17
6 9 3 10 9 1 10 1 5
'''
# A coding delight
from sys import stdin, stdout
import gc
gc.disable()
 
import sys, time, threading


	
# main starts
string = stdin.readline().strip()
i = 0
j = len(string) - 1
count = 0
while i < j:	
	if string[i] != string[j]:
		count += 1
	i += 1
	j -= 1
print(count)

Submission status: Accepted

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

s1, s2 = s[:l//2], s[-(l//2):][::-1]
c = 0

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

print(c)

Submission status: Accepted

Solution code:
S = str(input())
num = len(S) // 2
ans = 0

for i in range(num):
  if S[i] != S[-1-i]:
    ans += 1
  else:
    pass
print(ans)

Submission status: Accepted

Solution code:
s = input()
print(sum([1 if s[i] != s[-i-1] else 0 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[-i-1]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(count/2))

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((len(S)-cnt)//2)

Submission status: Accepted

Solution code:
#python3
def solve(s):
  import collections as cl
  cnt=0
  dq = cl.deque(s)
  while len(dq) > 1:
    if dq.popleft() != dq.pop(): cnt+=1
  return print(cnt)
  
solve(input())

Submission status: Accepted

Solution code:
S = input()
len_S = len(S)
list_S = list(S)

if len_S % 2 ==0:
    list_S1 = list_S[0:(len_S//2)]
    list_S2 = list_S[(len_S//2):len_S]
    list_S2.reverse()
    
else:
    list_S1 = list_S[0:(len_S//2)]
    list_S2 = list_S[((len_S//2)+1):len_S]
    list_S2.reverse()
    
count = 0

for i in range(len_S//2):
    if list_S1[i] != list_S2[i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = list(input())

con = 0

c = len(S) // 2
S1 = S[:c]
S2 = list(reversed(S[c:]))

for i,j in zip(S1,S2):
  if i != j:
    con += 1

print(con)

Submission status: Accepted

Solution code:
S = list(input())

half = len(S) // 2
count = 0

before = S[:half]
after = S[-half:]

after.reverse()

for i, d in enumerate(before):

    if d != after[i]:
        count+=1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)
print(sum(a != b for a, b in zip(S[:N//2], S[::-1])))

Submission status: Accepted

Solution code:
S = input()
print(sum(1 for a, b in zip(S[:len(S)//2], S[::-1]) if a != b))

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = read().rstrip()
T = S[::-1]
L = (len(S) + 1) // 2

ans = sum(x != y for x, y in zip(S[:L], T[:L]))
print(ans)

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


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

Submission status: Accepted

Solution code:
#!python3

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
S = input()
n = len(S)//2
sa = S[:n]
sb = S[-n:][::-1]
ans = 0
for a, b in zip(sa, sb):
    if a != b:
        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:
import math

def resolve():
    S = input()
    answer = judge_palindrome(S)
    print(answer)
    

def judge_palindrome(s):
    h = math.floor(len(s) / 2)
    not_palind_count = 0
    s_list = list(s)
    for i in range(h):
        if s_list[i] != s_list[-1*(i+1)]:
            not_palind_count += 1
    return not_palind_count

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
n = len(s)

cnt = 0
for i in range(n//2):
    j = n-1-i
    if i==j:
        continue

    if s[i]!=s[j]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = list(input())

s_r = s[::-1]

ans = 0
for i in range(len(s)//2):
	if s[i] != s_r[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:
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()
result = 0

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

print(result)

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 147 - B
# -*- encoding: UTF-8 -*-

s = input()
la = len(s)

lf = la // 2

slist =list(s)

flist = slist[:lf]
slist.reverse()
#print(flist)
#print(slist)
count = 0
for i in range(lf) :
  if flist[i] != slist[i] :
    count = count + 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

s = input().rstrip()
r = list(reversed(s))
ans = 0

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

print(ans//2)

Submission status: Accepted

Solution code:
S = input()
l = len(S)-1

if (l % 2 == 0):
    ls = l/2
else: 
    ls = l//2 + 1
ls = int(ls)
    
n = 0
for x in range(ls):
    if (S[x] != S[l-x]):
        #S = S.replace(S[l-x],S[x])
        n = n + 1
        #print(n)
        
print(n)

Submission status: Accepted

Solution code:
s = input()
counter = 0

if len(s) % 2 == 0:
  s_foward = s[:len(s)//2]
  s_back = s[len(s)//2:]
  
  for i in range(len(s_foward)):
    if s_foward[i] != s_back[len(s_back)-i-1]:
      counter += 1
else:
  s_foward = s[:(len(s)-1)//2]
  s_back = s[(len(s)+1)//2:]
  
  for i in range(len(s_foward)):
    if s_foward[i] != s_back[len(s_back)-i-1]:
      counter += 1
    
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
count = 0

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

print(cnt)

Submission status: Accepted

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

s = list(input())
len_s = len(s)

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

def f(s, t):
  c=0
  for i,j in zip(s,t):
    if i!=j:
      c+=1  
  return c//2

print(f(s,t))

Submission status: Accepted

Solution code:
S=input()
N=len(S)
if N%2==0:
    T0=S[:N//2]+S[:N//2][::-1]
    T1=S[::-1][:N//2]+S[::-1][:N//2][::-1]
else:
    T0=S[:N//2]+S[N//2]+S[:N//2][::-1]
    T1=S[::-1][:N//2]+S[N//2]+S[::-1][:N//2][::-1]
count0=0
count1=0
for n in range(N):
    if S[n]!=T0[n]:
        count0+=1
    if S[n]!=T1[n]:
        count1+=1
print(min(count0,count1))

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
l = []
str_len = int(len(s))

for i in range(str_len//2):
  if s[i] != s[str_len - i -1]:
    s[i] = s[str_len - i -1]
    l.append(s[i])

print(len(l))

Submission status: Accepted

Solution code:
str = input()

strlist = []

reversedstrlist = []

count = 0

strlist = list(str)

length = len(str)

reversedstrlist.append(strlist[::-1])

reversedstrlist = reversedstrlist[0]

for i in range(length):
    if strlist[i] != reversedstrlist[i]:
        count = count + 1
    else:
        continue

count = int(count / 2)

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

count = 0

len_s = len(s)
num = len_s - 1

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque

def main():
    S = input()
    count = 0
    d = deque(list(S))
    while len(d) > 1:
        left = d.popleft()
        right = d.pop()
        if left != right:
            count += 1

    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=list(input())

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

Submission status: Accepted

Solution code:
import math
import heapq
import sys
from collections import Counter
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

#N,K=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
#s = [input() for i in range(3)]

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:
# -*- coding: utf-8 -*-
s = input()

s_a = s[:int(len(s)/2)]

if len(s)%2 == 0:
    s_b = s[(int(len(s)/2)):]
else:
    s_b = s[(int(len(s)/2) + 1):]
s_b = s_b[::-1]

res = 0
for i in range(len(s_a)):
    if s_a[i] == s_b[i]:
        pass
    else:
        res += 1

print(res)

Submission status: Accepted

Solution code:
s = list(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:
# ABC147B - Palindrome-philia
def main():
    S = input().rstrip()
    length = len(S)
    ans = sum(i != j for i, j in zip(S[:length // 2], S[length // 2:][::-1]))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = str(input())

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

print(cnt)

Submission status: Accepted

Solution code:
input = list(input())
length = len(input)
quotient = length // 2

hug = 0
for count in range(0, quotient):
  if(input[count] != input[length - count - 1]):
    hug += 1

print(hug)

Submission status: Accepted

Solution code:
s = input()

count = 0

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

Submission status: Accepted

Solution code:
S = input()
ans = 0

# 旧: 非効率コード
# center = int(len_S / 2)
#
# former = S[:center]
# if len_S % 2 != 0:
#     center += 1
# latter = S[center:][::-1]
#
# for f, l in zip(former, latter):
#     if f != l:
#         ans += 1

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

len_S = len(S)
center = int(len_S / 2)

former = S[:center]
if len_S % 2 != 0:
    center += 1
latter = S[center:][::-1]

for f, l in zip(former, latter):
    if f != l:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
stS = input()

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

Submission status: Accepted

Solution code:
s = input()
cnt = 0
lenS = len(s)

for i in range(lenS):
    if s[i] != s[lenS - i - 1]:
        cnt += 1
    if lenS - 2 * i - 1 <= 1:
        break

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''input
3 5
1 2 1
2 3 0
'''
# connected components
from sys import stdin, setrecursionlimit
from bisect import bisect_left
import sys, threading
from collections import defaultdict

# main starts
string = stdin.readline().strip()
i = 0
j = len(string) - 1
count = 0
while i < j:
    if string[i] != string[j]:
        count += 1
    i += 1
    j -= 1
print(count)

Submission status: Accepted

Solution code:
s1 = input()

r3 = 0
for i2 in range(len(s1) // 2):
    if (s1[i2] != s1[len(s1) - i2 - 1]):
        r3 += 1

print(r3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(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 = list(input())
c = 0
while len(S) > 1:
    if S.pop(0) != S.pop(-1):
        c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

S=input()
lft = 0
rgt = len(S)-1

cnt = 0
while lft <= rgt:
    cnt += S[lft] != S[rgt]
    lft += 1
    rgt -= 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()

l = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Palindrome-philia

# input
S = input()

# solve
if len(S) % 2 != 0:
    S = S[:len(S)//2] + S[len(S)//2 + 1:]

res = sum([i != j for i, j in zip(S[:len(S)//2], S[len(S)//2:][-1::-1])])

# output
print(res)

Submission status: Accepted

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

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


main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
from math import floor


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

    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

S = input()
n = len(S) // 2 # 奇数も偶数もこれでいける

cnt = 0

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

Submission status: Accepted

Solution code:
s = input()
l = len(s)
m = l // 2

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

print(res)

Submission status: Accepted

Solution code:
from sys import stdin
import fractions

N = str(stdin.readline().rstrip())
# A = [int(x) for x in stdin.readline().rstrip().split()]
# print(N)
# print(A)

ans = 0 # change_count

n_list = list(N)
back = len(n_list) - 1

for i in range(0, len(n_list)//2):
    if not n_list[i] == n_list[back]:
        ans += 1
    back -= 1

print(ans)

Submission status: Accepted

Solution code:
text = input()
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

s0 = s[0:len(s)//2]
s1 = s[len(s)//2:len(s)][::-1]

count = 0
for i in range(len(s0)):
    if s0[i] != s1[i]:
        count += 1
    else:
        continue

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

# 最小公倍数
def gcd(a, b):
	if a < b:
		a, b = b, a
	while a % b != 0:
		a, b = b, a % b
	return b
 
# 最大公約数 
def lcm(a, b):
	y = a*b / gcd(a, b)
	return int(y)

def primes_for(n):
  is_prime = [True] * (n + 1)
  is_prime[0] = False
  is_prime[1] = False
  for i in range(2, n + 1):
      for j in range(i * 2, n + 1, i):
          is_prime[j] = False
  return [i for i in range(n + 1) if is_prime[i]]

# O(√A)
def isPrime(n):
  if n < 2:
    # 2未満は素数でない
    return False
  if n == 2:
    # 2は素数
    return True
  for p in range(2, n):
      if n % p == 0:
        # nまでの数で割り切れたら素数ではない
        return False
  # nまでの数で割り切れなかったら素数
  return True

# 回文 S[::-1]

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

Submission status: Accepted

Solution code:
import math
import fractions

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

Submission status: Accepted

Solution code:
s = input()
s_len = len(s)
halflen = s_len//2

cnt = 0
for i in range(halflen):
    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()
Length = len(S)
count = 0

if Length % 2 == 0:
    for i in range(0, int(Length / 2)):
        if S[i] != S[Length - i - 1]:
            count += 1
else:
    for i in range(0, int((Length - 1) / 2)):
        if S[i] != S[Length - i - 1]:
            count += 1
            
print(count)

Submission status: Accepted

Solution code:
S = input().strip()

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

left, right = 0, len(s) - 1
count = 0

while left < right:
    count += s[left] != s[right]
    
    left += 1
    right -= 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(cou)

Submission status: Accepted

Solution code:
s = input().rstrip()
left, right = 0, len(s) - 1
ret = 0
while left < right:
    ret += s[left] != s[right]
    left += 1
    right -= 1
print(ret)

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()
b = 0
l = len(s)-1
cnt = 0
while b < l:
    if s[b] != s[l]:
        cnt += 1
    b += 1
    l -= 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
word = input()
count = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

S_left = S[:len(S)//2]

if len(S) % 2 == 0:
    S_right = S[len(S)//2:]
else:
    S_right = S[len(S)//2+1:]

count = 0

for s1, s2 in zip(S_left, reversed(S_right)):
    if not s2 == s1:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
kaibun = input()
i=0
count = 0
while i+1<=len(kaibun)/2:
  #print( kaibun[i],kaibun[-i-1])
  if kaibun[i]!=kaibun[-i-1]:
    count+=1
  i+=1

print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
l = len(s)

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

Submission status: Accepted

Solution code:
import sys
import math


def getintarr():
    return list(map(int, input().split()))


S = input()

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

print(n)

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

str=input()
i=int(len(str))//2
count=0
s_count=0

while count < i:
    if str[count]  != str[(count+1)*-1]:
        s_count+=1
    count+=1
print (s_count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

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