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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 1
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"

S = v()

a = len(S)

if a % 2 == 0:
    ra = a//2
else:
    ra = a//2 -1

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

print(cnt)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s=input()
count=0
if s != s[::-1]:
    count += 1
print(count//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
hl = int(len(a)/2)
first = a[:hl]
last = a[:hl:-1]
ans = 0
for fi,la in zip(first,last):
    if fi != la :
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True
for i in range(len(s)):
    if is_kaibun(s):
        print(i)

Submission status: Wrong Answer

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

if N % 2 == 0:
    m = int(N/2)
    LS = S[:m]
    RS = S[N:m-1:-1]
else:
    m = int((N+1)/2)
    LS = S[:m-1]
    RS = S[N:m-1:-1]

ans = 0
for i in range(m-1):
    if LS == RS:
        pass
    else:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

print(ans)

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

t = s[::-1]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(res)

Submission status: Wrong Answer

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

if center % 2 == 1:
  s2 = s[center+1:]
else:
  s2 = s[center:]

s1 = s[:center]
s2 = "".join(reversed(s2))

for str1 , str2 in zip(s1,s2):
  if str1 != str2:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lit = input().split()
length = len(lit)
times = 0
if length != 1:
  for i in range(int(length/2)):
     if lit[i] != lit[length-1-i]:
       times += 1
  print(times)
else:
  print(times)

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = 0
if (len(s) % 2 == 0):
    halfidx = int((len(s)/2))
    ary  = s[0:halfidx]
    rary = list(reversed(s))[0:halfidx]
    for i in range(0,halfidx):
        if (ary[i] != rary[i]):
            ans = ans + 1
else:
    halfidx = int((len(s)//2))
    ary  = s[0:halfidx]
    rary = list(reversed(s))[0:halfidx]
    print(ary,rary)
    for i in range(0,halfidx):
        if (ary[i] != rary[i]):
            ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
ess = input()
sse = ess[::-1]
hugs = 0
for i in range(0, len(ess)):
  if ess[i] != sse[i]: hugs += 1
    
print(hugs)

Submission status: Wrong Answer

Solution code:
import math
A=list(input())
N=len(A)
x=0
for i in range(0,N):
    if A[i]!=A[N-1-i]:
        x+=1
a=math.ceil(x/2)
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = input()
a = x[::-1]
b = 0
c = 0
d = len(x)

while b >= d:
  if x[b] == a[b]:
    c = c
    b = b + 1
  else:
    c = c + 1
    b = b + 1
c = int(c/2)
print(c)

Submission status: Wrong Answer

Solution code:
s=input()

l=[]

for i in s:
  l.append(i)
new_l = l[::-1]

count=0
for a,b in zip(l,new_l):
  if a != b:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
s=input()

l=[]

for i in s:
  l.append(i)
new_l = l[::-1]
print(new_l)

count=0
for a,b in zip(l,new_l):
  if a != b:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
def actual(s):
    N = len(s)
    count_operation = 0

    for i in range(N):
        head = s[i]
        tail = s[N - 1 - i]

        if head != tail:
            count_operation += 1

    return count_operation / 2

s = input()
print(actual(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import collections
cc = collections.Counter(raw_input())
print max(0,sum([1 for k in cc if cc[k] % 1] or [0]) -1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# input
S = input()

hag = 0

rS = S[::-1]

for s, rs in zip(S, rS):
    if s != rs:
        hag += 1

print(hag)

Submission status: Wrong Answer

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

reversed_s = s[::-1]
count = 0

if s == reversed_s:
  print(0)
else:
  for i in range(len(s)):
    if s[i] != reversed_s[i]:
      count += 1

print(count)

Submission status: Wrong Answer

Solution code:
s = input()

reversed_s = s[::-1]
count = 0

if s == reversed_s:
  print(0)
else:
  for i in range(len(s)):
    if s[i] != reversed_s[i]:
      count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = []
n = len(s)
if n % 2 == 0:
    for i in range(n//2):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                ans.append(c)
            c = s.replace(s[-(i+1)], s[i])
            if c == c[::-1]:
                ans.append(c)
else:
    for i in range(n//2+1):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                ans.append(c)
            c = s.replace(s[-(i+1)], s[i])
            if c == c[::-1]:
                ans.append(c)
print(len(set(ans)))

Submission status: Wrong Answer

Solution code:
s = input()
ans = []
n = len(s)
if n % 2 == 0:
    for i in range(n//2):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                ans.append(c)
else:
    for i in range(n//2+1):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                ans.append(c)
print(len(set(ans)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
n = len(s)
if s == s[::-1]:
    print(0)
elif n % 2 == 0:
    for i in range(n//2):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                count += 1
else:
    for i in range(n//2+1):
        if s[i] != s[-(i+1)]:
            c = s.replace(s[i], s[-(i+1)])
            if c == c[::-1]:
                count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s =input()
cnt =0
a =len(s)
if a%2==0:
    a = a/2-1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

s = input()
#l = len(s) //2

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

def kisu(s):
    
    def is_a_kaibun(kaibun):
        for i in range(len(kaibun)//2):
            if kaibun[i] != kaibun[-i-1]:
                return False
        return True
    
    ans_k = 0
    l = len(s) //2
    
    for i in range(l):
        if s[i] != s[-i-1]:
            s.replace(s[i], s[-i-1])
            ans_k += 1
        if is_a_kaibun(s):
            return ans_k
    return l -1

def gusu(s):
    
    def is_a_kaibun(kaibun):
        for i in range(len(kaibun)//2):
            if kaibun[i] != kaibun[-i-1]:
                return False
        return True
    
    ans_g = 0
    l = len(s) //2
    
    for i in range(l):
        if s[i] != s[-i -1]:
            s.replace(s[i], s[-i -1])
            ans_g += 1
        if is_a_kaibun(s):
            return ans_g
    return l

if is_kaibun(s):
    print(0)
    sys.exit()

if len(s) % 2 == 0:
    print(gusu(s))
else:
    print(kisu(s))

Submission status: Wrong Answer

Solution code:
import sys
import math

s = input()
l = len(s) //2

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

if is_kaibun(s):
    print(0)
    sys.exit()

def kisu(s):    
    ans_k = 0
    l = len(s) //2
    for i in range(l +1, len(s)):
        if s[i] != s[l -i]:
            s.replace(s[i], s[l -i])
            ans_k += 1
        if is_kaibun(s):
            return ans_k
    return l -1

def gusu(s):
    ans_g = 0
    l = len(s) //2
    for i in range(l):
        if s[i] != s[l]:
            s.replace(s[i], s[l +i])
            ans_g += 1
        if is_kaibun:
            return ans_g
    return l
if len(s) % 2 == 0:
    print(gusu(s))
else:
    print(kisu(s))

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

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

    print(S)
    print(S_re)

    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: Wrong Answer

Solution code:
s = input();

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 (j/2)

Submission status: Wrong Answer

Solution code:
#--Palindrome-philia

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

num = len(s_str)

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

print (j/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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)

Submission status: Wrong Answer

Solution code:
s = list(input())

if len(s)%2!=0:
  point = int((len(s)-1)/2)
  count = 0
  for i in range(1,int((len(s)-1)/2+1)):
    if s[point-i]!=s[point+i]:
      count += 1
  print(count)
  exit()
elif len(s)%2==0:
  point1 = int(len(s)/2-1)
  point2 = int(len(s)/2)
  count = 0
  for i in range(1,int(len(s)/2)):
    if s[point1-i]!=s[point2+i]:
      count += 1
  print(count)

Submission status: Wrong Answer

Solution code:
s = list(input())

if len(s)%2!=0:
  point = int((len(s)-1)/2)
  count = 0
  for i in range(1,int((len(s)-1)/2+1)):
    if s[point-i]!=s[point+i]:
      count += 1
  print(count)
  exit()
elif len(s)%2==0:
  point1 = int(len(s)/2-1)
  point2 = int(len(s)/2)
  count = 0
  for i in range(1,int(len(s)/2)):
    if s[point1-i]!=s[point2-i]:
      count += 1
  print(count)

Submission status: Wrong Answer

Solution code:
s = list(input())

if len(s)%2!=0:
  point = int((len(s)-1)/2)
  count = 0
  for i in range(1,int((len(s)-1)/2+1)):
    if s[point-i]!=s[point+i]:
      count += 1
  print(count)
  exit()
elif len(s)%2==0:
  point1 = int(len(s)/2-1)
  point2 = int(len(s)/2)
  count = 0
  for i in range(1,int(len(s)/2-1)):
    if s[point1-i]!=s[point2-i]:
      count += 1
  print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

half = int(len(S) / 2)
S1 = S[:half]
S2 = S[::-1][:half]

count = 0
for s1, s2 in zip(S1, S2):
    if s1 != s2: count += 1

print(count)
key = 'b'
print({'a': 1, 'b': 2}.get(key))

Submission status: Wrong Answer

Solution code:
S = input()
rS = "".join([S[-i] for i in range(1,len(S)+1) ])

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

Submission status: Wrong Answer

Solution code:
s = list(input())

count = 0
for i,letter in enumerate(s):
  if s[i] != s[len(s) - 1 - i]:
    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())

t = list(reversed(s))

x = 0

for i in range(len(s)):

    if s[i] != t[i]:
        x += 1
        
print(x)

Submission status: Wrong Answer

Solution code:
s = list(input())
s_len = len(s)
ans = 0
if s_len % 2 == 0:
  for i, j in zip(s[0 : (s_len // 2 )], reversed(s[(s_len // 2) : s_len + 1])):
    if i != j:
      ans += 1
else:
  for i, j in zip(s[0 : (s_len // 2  )], reversed(s[(s_len // 2 + 3) : s_len])):
    if i != j:
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

cnt = 0

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

out = out // 2
print(out)

Submission status: Wrong Answer

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

out = 0
for i in range(len(S)):
  if S[i] != S_inv[i]:
    out = out + 1

print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(open(0).read())
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: Wrong Answer

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: Wrong Answer

Solution code:
s = input()
c = 0

if len(s) % 2 != 0:
    for i in range(len(s)//2+1,len(s)):
        if s[i] == s[-i-1]:
            pass
        else:
            c += 1
            
else:
    if s[len(s)//2] != s[len(s)//2 - 1]:
        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: Wrong Answer

Solution code:
S = input()
F = set(S)
D = list(S)[::-1]
G = set(D)
print(int(len((F-G))/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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)-1):
    #i文字目と後ろからi文字目が一緒なら何もしない
    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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    S = input()
    reversed_S = S[::-1]

    ans = 0
    for ch, rev_ch in zip(S, reversed_S):
        if ch != rev_ch:
            ans += 1
    
    print(ans/2)
        
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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)