Problem:


Score : 200 points

Problem Statement

Takahashi loves palindromes. Non-palindromic strings are unacceptable to him. Each time he hugs a string, he can change one of its characters to any character of his choice.

Given is a string S. Find the minimum number of hugs needed to make S palindromic.

Constraints

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

Print the minimum number of hugs needed to make S palindromic.

Sample Input 1

redcoder

Sample Output 1

1

For example, we can change the fourth character to o and get a palindrome redooder.

Sample Input 2

vvvvvv

Sample Output 2

0

We might need no hugs at all.

Sample Input 3

abcdabc

Sample Output 3

2



Sample input:
redcoder


Sample output:
1

Submission status: Accepted

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

Submission status: Accepted

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

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

# In[12]:


S = input()


# In[13]:


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


# In[ ]:

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    s=input()
    ans=0
    for c1,c2 in zip(s,s[::-1]):
        if c1!=c2:ans+=1
    print(ans//2)
main()

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()
n = len(s)
n = n // 2

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

s1 = s[:length]
if len(s)%2==0:
    s2 = s[length:]
else:
    s2 = s[length+1:]
s2 = s2[::-1]

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

Submission status: Accepted

Solution code:
import sys
import math
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()
N = len(s)
n = N//2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = list(map(int, input().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()
len_s = len(s)
cnt = 0
for i in range(len_s // 2):
    if s[i] != s[-i-1]:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
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:
import sys
readline = sys.stdin.readline
S = list(map(ord, readline().strip()))

cnt = 0
for s, si in zip(S, S[::-1]):
    if s != si:
        cnt += 1
print(cnt//2)

Submission status: Accepted

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

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
S = input()

N = len(S)//2

ans = 0
for a,b in zip(S[:N],S[-1:N-1:-1]):
    if a != b:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
S = input()

N = len(S)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
turn=len(s)//2
answer=0

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

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()

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

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:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    ans = 0
    for i in range(len(S)//2):
        if S[i] != S[len(S)-i-1]:
            ans += 1
    return ans


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:


s=input()

i=0
j=len(s)-1
c=0
while(i<j):
	if(s[i]!=s[j]):
		c+=1
	i+=1
	j-=1

print(c)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
from itertools import count
from functools import lru_cache
from collections import defaultdict
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok
#

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
S = list(input())

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

print (count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
hits = 0
leng = 0
for k in range(len(s)//2):
    hits += s[k] == s[-k - 1]
    leng += 1
print(leng - hits)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1

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

Submission status: Accepted

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

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

print(sum(a!=b for a,b in zip(S, S[::-1]))//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:
st = input()
i = 0
j = len(st)-1
c = 0
while i<j:
    if st[i]!=st[j]:
        c += 1
    i += 1
    j -= 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S = input()
ans = 0

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

    if S[i] != S[-1-i]:
        ans += 1

print (ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    S=input()
    n=len(S)
    pre=S[:n//2]
    suf=S[n-n//2::]
    suf=suf[::-1]
    ans=0
    for p,s in zip(pre,suf):
        ans+=(p!=s)
    print(ans)
resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

s = input().rstrip()
cnt = 0
for s1, s2 in zip(s, s[::-1]):
    if s1 != s2:
        cnt += 1
print(cnt // 2)

Submission status: Accepted

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

left = 0
right = n - 1
ret = 0
while left <= right:
    if s[left] != s[right]:
        ret += 1
    left += 1
    right -= 1
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
# ABC147b


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
i,j = 0, len(S) - 1
ans = 0
while i < j:
  if S[i] != S[j]:
    ans += 1
  i += 1
  j -= 1

print(ans)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
s = input()

ans = 0
for i, j in zip(s, s[::-1]):
    if i != j:
        ans += 1

print(ans//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[-i-1]:
        continue
    else:
        ANS+=1
print(ANS)

Submission status: Accepted

Solution code:
s = list(input())

ans = 0
L = 0
R = len(s) - 1

while L < R:
    if s[L] != s[R]:
        ans += 1
    L += 1
    R -= 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
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:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    ans = 0
    for i,s in enumerate(S):
        if s!=S[-i-1]:
            ans += 1
    print(ans//2)
if __name__ == '__main__':
    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()
res = 0
for i in range(len(s) // 2):
  res += (s[i] != s[len(s) - i - 1])
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
from math import ceil, floor, sqrt

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

S = str(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

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
# import numpy as np
# import scipy
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return [list(map(int, input().split())) for _ in range(n)]

def main():
    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)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
cnt = 0

for s, t in zip(S, S[:: -1]):
    if s != t:
        cnt += 1

print(cnt // 2)

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

S = sys.stdin.buffer.readline().decode().rstrip()
T = S[::-1]

cnt = 0
for i in range(len(S)):
    cnt += S[i] != T[i]
ans = cnt // 2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import queue
import math
import copy
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

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:
# import sys
# input = sys.stdin.readline
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()
n = len(s)
res = 0
for i in range(n // 2):
    a, b = s[i], s[-1-i]
    if a != b:
        res += 1

print(res)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = input()
    ans = 0
    for i in range(len(s)>>1):
        ans += (s[i] != s[-1-i])
    print(ans)
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
string = input()
half1 = string[0:len(string)-1]
string = reversed(string[len(string):])
ind = 0
out = 0
for char in half1:
    if char != string[ind]:
        out += 1
    else:
        pass
print(out)

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(p)

Submission status: Runtime Error

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

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

print(count)

Submission status: Runtime Error

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


print(cnt)

Submission status: Runtime Error

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: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

Solution code:
s=list(input())
if len(s)%2==0:
  c=len(s)/2
  d=i*(-1)-1
  sum=0
  for i in range(c):
    if s[i]!=s[d]:
      sum+=1
  print(sum)
else:
  sum2=0
  e=(len(s)-1)/2
  f=i*(-1)-1
  for i in range(e):
    if s[i]!=s[f]:
      sum2+=1
  print(sum2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

Solution code:
#B
from collections import deque
s = deque(list(input()))
cnt = 0
while 1 <= len(s):
    r = s.pop()
    l = s.popleft()
    if r != l:
        cnt += 1
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = list(input())

firstS = S[:len(S) // 2]
secondS = list(reversed(S[len(S) // 2 + 1:]))

count = 0

for x in range(len(firstS)):
    if firstS[x] != secondS[x]:
        count += 1
print(count)