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 = str(input())
hug = 0

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

    if s[i]!=s[-1-i]:
        hug += 1

print(hug)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

s = str(input())
t = s[::-1]
count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(input())

count = 0

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

print(count)

Submission status: Accepted

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

if a%2==0:
    a = a/2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

lis = list(input())
count = 0


lisA = lis[:math.floor(float(len(lis))/2)]
lisB = lis[math.ceil(float(len(lis))/2):]

lisB.reverse()



for i in range(int(len(lis)/2)):
    if lisA[i] != lisB[i]:
        count += 1
    

print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
import collections
import itertools as it
import math
#import numpy as np
 
s = input()
#  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

sp = s[:len(s)//2]
sn = s[len(s)//2:]

#if len(sp) == len(sn):
#    sn = sn[1:]

ans = 0
#print(sp, sn[::-1])
for sp_, sn_ in zip(sp, sn[::-1]):
    #print(sp_, sn_)
    if sp_ != sn_:
        ans += 1

print(ans)

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

Solution code:
S = input()

N = len(S)

t = N // 2

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
S = input()
cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
import sys, math
from pprint import pprint
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

S = rs()

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

Submission status: Accepted

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

def main():
    S = input()
    S_re = list(reversed(S))
    S = list(S)

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


main()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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

mid = len(S) // 2
forward = S[:mid]
backward = S[mid:][::-1]

hug_num = [1 if f_c != b_c else 0 for f_c, b_c in zip(forward, backward)]

print(sum(hug_num))

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3

S = input()

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

S_front = S[:len_half]
S_back = S[len_half:][::-1]
cnt = 0

for i, j in zip(S_front, S_back):
    if i == j:
        continue
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
#入力
S = input()
#扱いやすくするためリスト化
ls = list(S)
#反転させたものもリスト化する
lsr = list(reversed(ls))
count = 0
#反転前後リストで不一致の要素数をカウント
for i in range(len(ls)):
  if ls[i] != lsr[i]:
    count += 1
#結果(書いてみればわかるが1つ書き直すべき時は反転させたリストと元のリストは2つ不一致が生まれる)
print(count//2)

Submission status: Accepted

Solution code:
#入力
S = input()
#扱いやすくするためリスト化
ls = list(S)
#反転させたものもリスト化する
lsr = list(reversed(ls))
count = 0
for i in range(len(ls)):
  if ls[i] != lsr[i]:
    count += 1
print(count//2)

Submission status: Accepted

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

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

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

if len(s) % 2 == 0:
  harf = int(len(s) / 2 - 1) + 1;
else:
  harf = int((len(s) - 1) / 2);

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

Submission status: Accepted

Solution code:
s = input()
s_reverse = s[::-1]
if len(s) %2 ==0:
    n=len(s)//2
else:
    n = len(s)//2 +1

ans = 0
for i in range(n):
    if s[i] != s_reverse[i]:
        ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

S = input()
len_S = len(S)
half = math.floor(len_S/2)

counter = 0
for i in range(half):
    if S[i] != S[len_S-i-1]:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
S = list(input())
S1 = S[:len(S) // 2]
S2 = S[len(S) // 2:]
S2.reverse()

cnt = 0
for i in range(len(S1)):
    cnt += int(S1[i] != S2[i])

print(cnt)

Submission status: Accepted

Solution code:
s = input()
n = len(s)
a = n//2
x = 0
c = 0
while x <a:
  if s[x] != s[-x-1]:
    c += 1
  x += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.readline().strip()
i = 0
k = -1
cnt = 0
while i < len(s)/2:
  if s[i] != s[k]:
    cnt += 1
  i += 1
  k -= 1
print(cnt)

Submission status: Accepted

Solution code:
string = list(input())

reverse_string = string[-1::-1]

count = 0
for i in range(len(string)):
    if string[i] != reverse_string[i]:
        count += 1
print(int(count/2))

Submission status: Accepted

Solution code:
s = list(input())

l = len(s)
count=0

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


print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

print(int(cnt/2))

Submission status: Accepted

Solution code:

s = list(input())
count = 0

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

Submission status: Accepted

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

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:
import math
s = input()
s_x = s[::-1]
count=0
for i in range(len(s)):
    if s[i]==s_x[i]:
        count+=0
    else:
        count+=1
print(math.floor(count/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

# s ="redcoder"

len = int(len(s)/2)

input = s[:len]
reverse_s =s[::-1]
reverse_s=reverse_s[:len]

cnt = 0

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

# print(input)
# print(reverse_s)
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
s_div = int(int(len(s)) / 2) 
s_fin = int(len(s)) - 1
counter = 0

for i in range(s_div):
  if s[i] != s[s_fin - i]:
    counter += 1
    
print(counter)

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
S=list(input())

ans=0
n=len(S)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ret = 0

n = len(S)//2 + len(S)%2

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

for i in range(L):
    if N[i]==N[len(N)-(i+1)]:
        count+=1


print(L-count)

Submission status: Accepted

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

for i in range(num):
    if not s[i] == s[len(s)-(i+1)]:
        ans = ans + 1
print(ans)

Submission status: Accepted

Solution code:
#--Palindrome-philia

S = input()
s_str = list(S)
s_rev = s_str[::-1]

num = len(s_str)

j = 0
for i in range(num):
  if (s_str[i] == s_rev[i]):
    pass
  else:
    j = j + 1

print (int(j/2))

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]:
    continue
  else:
    cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
# ABC 147: B – Palindrome-philia
S = input()

length = len(S)
half = length // 2
head = S[:half]
tail = ''

if length % 2 == 0:
    tail = S[half:]
else:
    tmp = half + 1
    tail = S[tmp:]

tail = tail[::-1]

count = 0
for i in range(half):
    if head[i] != tail[i]:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
c=0
for n,r in zip(s[:len(s)//2],s[::-1]):
    if not n==r:
        c+=1
print(c)

Submission status: Accepted

Solution code:
S = input()

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

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:
import sys
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    S = input(str)
    n = ceil(len(S) / 2) + 1
    ans = 0
    for x, y in zip(S[:n], S[:-n:-1]):
        ans += 1 if not x == y else 0
    print(ans)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

Solution code:
S = list(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()

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

print(cnt)

Submission status: Accepted

Solution code:
import math
b = input()
c = 0
for i in range(math.floor(int(len(b)/2))):
   if(b[i] != b[-i-1]):
        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:
s = input()
n = len(s)
cnt = 0
for i in range(n//2):
    if s[i] == s[n-i-1]:
        continue
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(int(ans/2))

Submission status: Accepted

Solution code:
s = input()

r = s[::-1]
hug = 0
if len(s) % 2 == 0:
    mid = int(len(s)/2)
else:
    mid = int((len(s) - 1)/2)

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

print(hug)

Submission status: Accepted

Solution code:
s = list(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:
import math

s = input()

firstHalf = s[:math.floor(len(s) / 2)]
reversedSecondHalf = s[math.ceil(len(s) / 2):][::-1]

ans = 0
for i in range(len(firstHalf)):
    if (firstHalf[i] != reversedSecondHalf[i]):
        ans += 1

print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def q2():
    s = input()
    d,m = divmod(len(s), 2)
    s_a = s[:d]
    s_b = ''.join(reversed(s[d+m:]))
    ans = 0
    
    for i in range(d):
        if s_a[i] != s_b[i]:
            ans += 1
    print(ans)


if __name__ == '__main__':
    q2()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC147B - Palindrome-philia

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
S_re = S[::-1]
cnt = 0

for s, r in zip(S, S_re):
    if s!=r:
        cnt += 1
print(int(cnt/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = len // 2
ans = 0

for i in range(n):
  k = (i+1) * (-1)
  if S[i] != S[k]:
    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)-i-1]:
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
T = S[::-1]
count = 0
N = len(S)
if N % 2 == 0:
    A = int(N / 2)
else:
    A = int((N-1) / 2)

for i in range(A):
    if S[i] == T[i]:
        pass
    else:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
ans = 0
for c1, c2 in zip(s, reversed(s)):
	if c1 != c2:
		ans += 1
print(ans // 2)

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:
class PalindromePhilia:
    def calculate(self, list):
        counter = 0
        n = 0
        length =len(list)
        div = length // 2
        for d in range(div):
            if list[d] != list[length - n -1]:
                counter +=1
            n += 1
        return counter

if __name__ == "__main__":
    A = input()
    list_num = [a for a in A]
    pp = PalindromePhilia()
    result = pp.calculate(list_num)
    print(str(result))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import math
import fractions
import sys
#入力:N(int:整数)
def input1():
	return str(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(str,input().split()))


s=list(str(input()))
len_s=len(s)
count=0
for i in range(len_s):
	if s[i]!=s[-(i+1)]:
		s[i]=s[-(i+1)]
		count+=1
	else:
		continue
print(count)

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 sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
T = S[::-1]

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

print(counter)

Submission status: Accepted

Solution code:
s=input()
a=[str(c) for c in s]
m=len(a)
l=len(a)//2 #最大でl回

n=0
for i in range(l):
  if a[i]!=a[m-1-i]:
    n+=1
    
print(str(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
s1 = s[::-1]#後ろから
count = 0
for i in range (len(s)):
    if s[i] != s1[i]:
        count += 1
print(count // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


def solve(S: str):
    l = len(S)
    h = 0
    for i in range(l//2):
        if S[i]!=S[-(i+1)]:
            h+=1

    print(h)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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 = 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 = list(input())
ans = 0
for a,b in zip(s,s[::-1]):
    if a != b:
        ans += 1
print(ans//2)

Submission status: Accepted

Solution code:
s=input()
s_rev=str()
for i in range(1,len(s)+1):
    s_rev+=s[-i]

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

def check(word):
    if word == word[::-1]:
        return True
    else:
        return False

count = 0

w1 = S[:len(S)//2]
w2 = S[:len(S)//2-1:-1]

for a,b in zip(w1,w2):
    if a != b:
        count += 1

print(count)

Submission status: Accepted

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

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:
s = input()
l = len(s)
half = l // 2
ans = 0
for x,y in zip(s[:half],s[-1:half-1:-1]):
    if x != y:
        ans += 1
print(ans)