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:
a=list(input())
b=[0]*len(a)
for k in range(0,len(a)):
  b[k]=a[k]
b.reverse()

count=0
for k in range(0,int(len(a)/2)):
  if a[k]!=b[k]:
    count=count+1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
import sys
# input = sys.stdin.buffer.readline
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

Solution code:
def kaibun(data):
    str1 = data
    str2 = data[::-1]

    count = 0
    for i in range(round(len(str1)/2)):
        if str1[i] != str2[i]:
            count += 1

    return count 

input_data = input()

print(kaibun(input_data))

Submission status: Accepted

Solution code:
s = input()
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

c = len(a) // 2
if len(a) % 2 == 0:
    x = a[:c]
    y = a[c :]
    z = y[::-1]

else:
    x = a[:c]
    y = a[c + 1:]
    z = y[::-1]

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
def main():
    S = input()
    N = len(S)
    l, r = 0, N-1
    res = 0
    while l < r:
        lc = S[l]
        rc = S[r]
        if lc != rc:
            res += 1
        l += 1
        r -= 1

    print(res)

    

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
print(sum(i < j for i,j in zip(s, s[::-1])))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
count = 0

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9 +7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

s = inputS()

s = list(s)
s_ = s[::-1]

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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()
c = 0

if len(s) % 2 == 0:
    for i in range(len(s)//2,len(s)):
        if s[i] == s[-i-1]:
            pass
        else:
            c += 1
            
else:
    for i in range(len(s)//2 + 1,len(s)):
        if s[i] == s[-i-1]:
            pass
        else:
            c += 1
            
print(c)

Submission status: Accepted

Solution code:
s = input()
t = s[::-1]
res = 0
for a, b in zip(s, t):
    if not a == b:
        res += 1
print(res//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:
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()
num = len(S)

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

Submission status: Accepted

Solution code:
s = input()
s_rev = ''.join(list(reversed(s)))

ret = 0

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

print(ret // 2)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

S = input().strip()
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()
le = len(s)//2
ans = 0

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

Submission status: Accepted

Solution code:
s = input()
cnt = 0

while(True):
  if(len(s)<=1):
    break
 
  if(s[0] != s[-1]):
    cnt+=1
  s = s[1:-1]
 
  
print(cnt)

Submission status: Accepted

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())

# s = deque(input())
s = input()

# a, b = map(int, input().split())
# a = list(map(int, input().split()))

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

print(count)

Submission status: Accepted

Solution code:
s = input().rstrip()

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

l = [s != r for s, r in zip(S, S[::-1])]
print(sum(l)//2)

Submission status: Accepted

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

count = 0
for org, reverse in zip(S, r_S):
    if org != reverse:
        count += 1
        
print(count//2)

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:
def main():
    
    s = str(input())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = list(input())
D = list(S)[::-1]
n = 0
for i in range(len(S)):
  if S[i] != D[i]:
    n += 1
print(int(n/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:
#147_B
s = input()
ans = 0
for i in range(0, len(s)//2):
    if s[i] != s[-i-1]:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
if(len(S)%2==0):
  num=len(S)//2-1
  A=S[:num+1]
  B=S[num+1:]
else:
  num=len(S)//2
  A=S[:num+1]
  B=S[num:]

B=B[::-1]
count=0
for i in range(len(A)):
  if(A[i]!=B[i]):
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#文字列の入力
S = input()

#listを一文字ずつのlistに
S_list = list(S)
ans = 0
#偶数文字の場合
if(len(S_list)%2==0):
  #文字数/2回for文
  for i in range(int(len(S_list)/2)):
    #i文字目と後ろからi文字目が一緒なら何もしない
    #print(i,len(S_list)-i-1)
    if(S_list[i]==S_list[len(S_list)-i-1]):
      ans = ans + 0
    #一緒じゃ無い場合
    else:
      ans = ans + 1
else:
  for i in range(int(len(S_list)/2)):
    #print(i,len(S_list)-i-1)
    if(S_list[i]==S_list[len(S_list)-i-1]):
      ans = ans + 0
    else:
      ans = ans + 1
print(ans)

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
palindrome = list(input())
half = len(palindrome) // 2
lst = list()

for i in range(half):
    if palindrome[i] != palindrome[len(palindrome) - i - 1]:
        lst.append(palindrome[i])
print(len(lst))

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
ans=0
a=len(S)/2
if len(S)%2==0:
	S1=S[:int(len(S)/2)]
	S2=S[int(len(S)/2):]
else:
	S1=S[:int(len(S)/2)]
	S2=S[int(len(S)/2)+1:]
S3 = S2[::-1]
for i,j in zip(S1,S3):
	if i!=j:
		ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

count = 0

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

Submission status: Accepted

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

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:
s = str(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()
S = [i for i in S]
N = len(S)
cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 12 01:53:56 2020

@author: Kanaru Sato
"""

s = input()
hag = 0

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


print(hag)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(K)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    S = input()
    a = list(S)
    b = list(S)
    a.reverse()
    c = 0
    for i in range(len(S)):
        if a[i] != b[i]:
            c += 1
    
    return c // 2

print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
def main():
    str = input()
    num = int(len(str)/2)
    dflg = int(len(str)%2)
    array1=[]
    array2=[]
    
    if dflg == 0:
        for i in range(num):
        	array1.append(str[i])
        for i in range(num, len(str)):
            array2.append(str[i])
    else:
        for i in range(num):
            	array1.append(str[i])
        for i in range(num+1, len(str)):
                array2.append(str[i])

    cnt = 0
    rev_array = array1[::-1]

    for i in range(num):
        if rev_array[i] != array2[i]:
            cnt = cnt+1
    
    print(cnt)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
cmin = lambda a,b : a if a<b else b
cmax = lambda a,b : a if a>b else b
iin = lambda : int(input())
lin = lambda : list(map(int,input().split()))
rin = lambda n : [int(input()) for _ in range(n)]

s = input()

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

Submission status: Accepted

Solution code:
s = input()

s_len = len(s)

is_even = False

if s_len % 2 == 0:
    is_even = True

half_s_len = s_len // 2


if is_even:
    s_len_half = half_s_len
    mae = s[:half_s_len]
    ato = s[s_len_half:]
else:
    s_len_half = half_s_len + 1
    mae = s[:half_s_len]
    ato = s[s_len_half:]


ato_gya9 = ato[::-1]


count = 0

x = len(mae)

for i in range(x):
    if mae[i] != ato_gya9[i]:

        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

s = ns()
cnt = 0
for si, sj in zip(s, reversed(s)):
    if si != sj:
        cnt += 1
print(cnt//2)

Submission status: Accepted

Solution code:
import math
def solve():
    S = list(input())

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
s = str(input())
r_s = s[::-1]
cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
S = input()
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(s):
    isEven = int(len(s)%2)
    ran = int((len(s)-1)/2 if isEven else (len(s)/2))
    count = 0
    for i in range(ran):
        if s[i] != s[-(i+1)]:
            count += 1
    return count

s = input()
print(main(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
def main():
    S = input()
    length = len(S)
    loop_count = length // 2
    count = 0

    for i in range(loop_count):
        if(S[i] != S[length - i -1]):
            #print(S[i],"==",S[loop_count - i -1])
            count += 1

    print(count)


if __name__ == "__main__":
    main()

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:
def calc(mae,ushiro):
    reverse_mae = ''.join(list(reversed(mae)))
    if ushiro == reverse_mae:
        cnt = 0
    else:
        cnt=0
        for i in range(len(ushiro)):
            if ushiro[i] == reverse_mae[i]:
                pass
            else:
                cnt+=1
    return cnt


s = input()
if len(s) == 1:
    print(0)

elif len(s)%2==0:
    mae = s[:len(s)//2]
    ushiro = s[len(s)//2:]
    cnt = calc(mae,ushiro)
    print(cnt)

else:
    mae = s[:len(s)//2]
    ushiro = s[len(s)//2+1:]
    cnt = calc(mae,ushiro)
    print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

k = len(s)//2

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
#a,b= map(int,input().split())
#li= [int(x) for x in input().split()]
a=input()
count=0

for i in range(len(a)//2):
  if a[i]==a[-i-1]:
    continue
  else:
    count+=1
print(count)

Submission status: Accepted

Solution code:
import sys
import math
#a,b= map(int,input().split())
#li= [int(x) for x in input().split()]
a=input()
b=len(a)
e=[]
count=0
if b%2==0:
  c=a[math.floor(b/2):]
  f=int(b/2)
  f+=1
else:
  b+=1
  c=a[math.floor(b/2):]
  f=int(b/2)
e = list(reversed(c))
d=list(a)
#print(str(d)+"  "+str(e))
for i in range(f-1):
  if d[i]==e[i]:
    continue
  else:
    count+=1
print(count)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

s_reverse = s[::-1]

hug = 0

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

print(hug)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = list(input())
num = len(S)//2
count = 0

if  len(S)%2 == 0:
    a = S[:num]
    b = S[num:]
else:
    a = S[:num]
    b = S[num + 1:]
b.reverse()

for i in range(num):
    if not a[i] == b[i]:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = str(input())

length =  int(len(S))
clength = int(len(S)/2)

ans = 0
for count in range(clength):
    if S[count] != S[length-count-1]:
        ans = ans + 1
print(ans)