Problem:


Score : 200 points

Problem Statement

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

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

Constraints

S is a string consisting of lowercase English letters.

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

Input

Input is given from Standard Input in the following format:

S

Output

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

Sample Input 1

redcoder

Sample Output 1

1

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

Sample Input 2

vvvvvv

Sample Output 2

0

We might need no hugs at all.

Sample Input 3

abcdabc

Sample Output 3

2



Sample input:
redcoder


Sample output:
1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()
num = int(len(s)/2)
count = 0

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

Submission status: Accepted

Solution code:
sen = input()

long = len(sen)
count = 0

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

print(count)

Submission status: Accepted

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

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


print(count)

Submission status: Accepted

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


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

print(count)

Submission status: Accepted

Solution code:
from math import modf
word=input()
word=list(word)
n=len(word)/2
decimal,integer=modf(n)
integer=int(integer)
count=0
for i in range(integer):
  if word[i]!=word[-i-1]:
    word[-i-1]=word[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[-i-1]:
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
# B - Palindrome-philia

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

def get_reversed_str(s):
	return list(reversed(s))

reversed_s = get_reversed_str(s)

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

			count += 1
			if s != get_reversed_str(s):
				continue
			else:
				break
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = list(input())
s_len=len(s)//2
s_r=s[::-1]
front=s[:s_len]
back=s_r[:s_len]

i=0
cou = 0
for a in front:
    if back[i] != a:
        back[i]=a
        cou += 1
    i+=1
print(cou)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
string = input()
count = 0
for i in range(int(len(string) / 2)):
    if string[i] != string[-(i+1)]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
result = 0

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

print(result)

Submission status: Accepted

Solution code:
S = input()
k = 0

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

print(int(k/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input())
b = list(reversed(a))

cnt = 0

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

print(int(cnt / 2))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
cnt = 0
while len(s) > 1:
  if s[0] != s[-1]:
    cnt += 1
  s = s[1:-1]
print(cnt)

Submission status: Accepted

Solution code:
S = input()


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
word = input()
word_len2 = int(len(word)/2)
word_len = len(word)-1
count = 0
for i in range(word_len2):
    if not word[i] == word[word_len-i]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

cnt = 0
b = int(len(s))

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

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()
    ans=0
    for s,t in zip(S,S[::-1]):
        ans+=s!=t

    print(ans//2)
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string = input()

length = len(string)
half = length // 2
if length % 2 == 0:
    left = string[:half]
    right = string[half:]
else:
    left = string[:half]
    right = string[half+1:]
assert len(left) == len(right)

diff = 0
for i in range(half):
    if left[i] != right[-1-i]:
        diff += 1
print(diff)

Submission status: Accepted

Solution code:
import sys

s = list(input())

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

print(i)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ret = 0
for idx, s in enumerate(reversed(S)):
    if S[idx] != s:
        ret += 1
print(ret // 2)

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    s = str(input().rstrip('\n'))
    cnt = 0
    for i in range(len(s)):
        if s[i] != s[-i-1]:
            cnt += 1
    print(cnt // 2)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

ret = 0

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

print(ret)

Submission status: Accepted

Solution code:
s = input()
count = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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


print(cnt // 2)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B - Palindrome-philia

s = str(input())
n = len(s)
counter = 0

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

print(counter)

Submission status: Accepted

Solution code:
word = input()
wordArray = list(word)
#print(wordArray)
lent = len(wordArray)

iterV=(int)(lent/2)

if(lent%2==0):
 iterV=iterV+1
#print(iterV)

num=0

for i in range(iterV):
    #print("Word at:",i,wordArray[i])
    #print("Word at:",lent-1,wordArray[lent-1])
    if(wordArray[i] != wordArray[lent-1]):       
       wordArray[i]=wordArray[lent-1]      
       #print("else Word at post swap:",i,wordArray[i])
       #print("else Word at post swap:",lent-1,wordArray[lent-1])
       num=num+1       
    lent=lent-1
#print(" else Num:",num)
#print(" else lent:",lent)

print(num)

Submission status: Accepted

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

A = input()

count = 0

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

print(count)

Submission status: Accepted

Solution code:
s = str(input())
cnt = 0
sle = len(s)
n = int(sle/2-1)
for a in range(n+1):
    if s[a] != s[sle-a-1]:
            s.replace(s[a],s[sle-a-1])
            cnt += 1
print(cnt)

Submission status: Accepted

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

print(d//2)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
S = input()

count = 0

num = int(len(S)/2)

for i in range (0,num):

     if S[i] != S[-i-1]:
         count += 1
print(count)

Submission status: Accepted

Solution code:
s = input("")
i = 0
length = len(s)

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

Submission status: Accepted

Solution code:
s = input("")
i = 0
length = len(s)
# print(type(len))
# print(len)
count = 0
for i in range (0, length):
    if s[i] != s[length - i - 1]:
        count += 1

print(int(count / 2))

Submission status: Accepted

Solution code:
s = raw_input()
n = len(s)
i = 0
j = n-1
ans = 0
while(i<j):
    if(s[i]!=s[j]):
        ans+=1
    i+=1
    j-=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

size = len(S)
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import math

input_str = str(input())
cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

a=input()
a_half=a[:len(a)//2:]
a_half_int=a[-(-len(a)//2)::]
a_half_int=a_half_int[::-1]
b=list(a_half)
c=list(a_half_int)
ans=0
for i in range(len(a)//2):
    if b[i] != c[i]:
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':

	S = list(input())

	num = len(S) // 2

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

	print(cnt)

Submission status: Accepted

Solution code:
def min_number_changes_palindrome(input_str):
    first = ""
    second = ""
    half_len = int(len(input_str) / 2)
    first = input_str[:half_len]
    if len(input_str) % 2 == 0:
        second = input_str[half_len:]
    else:
        second = input_str[half_len + 1:]
    second = second[::-1]
    changes_count = 0
    for i in range(0, len(first)):
        if first[i] != second[i]:
            changes_count += 1
    return changes_count

print(min_number_changes_palindrome(input("")))

Submission status: Accepted

Solution code:
S = input()
k = S[::-1]
count = -1
realcount = 0
for i in k:
    count +=1
    if i!=S[count]:
        S.replace(S[count],i)
        realcount+=1
    if realcount == 0:
        real = 0
    else:
        real = realcount//2
print(real)

Submission status: Accepted

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

s = input()
s_list = list(s)
s_len = len(s_list)

hag = 0

for i in range(s_len//2):
  if s_list[i] != s_list[(s_len-1)-i]:
    s_list[(s_len-1)-i] = s_list[i]
    hag += 1
  
print(hag)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math
def main():
    S = input()
    S_len = len(S)
    hug_count = 0
    for i in range(math.floor(S_len/2)):
        if S[i] != S[S_len - (i+1)]:
            hug_count += 1
    print(hug_count)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count=0
i=0
while("".join(s) != "".join(s_r)):
    
    if (s[i] != s_r[i]) and i<len(s):
        s[i] = s_r[i]
        s_r = s[::-1]
        count+=1
    i+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
count = 0
if len(s) % 2 ==0:
  s1 = s[:len(s)//2]
  s2 = s[len(s)//2:]
else:
  s1 = s[:len(s)//2]
  s2 = s[len(s)//2+1:]
  
s2.reverse()

for (i,j) in zip(s1,s2):
  if i != j:
    count += 1
print(count)

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

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

print(len(S)//2-cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w1 = input()

wl1 = []
for i in w1:
  wl1.append(i)
#print(wl1)

n = len(wl1)
wl2 = [""] * n
for i in wl1:
  wl2[n-1] = i
  n -= 1
#print(wl2)

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

Submission status: Accepted

Solution code:
S = input()
lis = list(S)
lis_rev = list(S)
lis_rev.reverse()
cnt = 0

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

Submission status: Accepted

Solution code:
s = raw_input()
print sum([s[i] != s[len(s)-1-i] for i in xrange(len(s))]) / 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:
def solve(s):
    n = len(s)
    ans = 0
    for i in range(n//2):
        if s[i] != s[-i-1]:
            ans += 1
    return ans

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
S = input()

a = S
b = S[::-1]
n = round(len(S)/2)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ans = 0

for i in range (len(S)//2):
    if (S[i] != S[len(S)-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:
line = input()
count = 0
S = []
mojisuu = len(line)

for i in range(mojisuu):
    S.append(line[i])

if mojisuu % 2 == 0:
    for j in range(int(mojisuu/2)):
        if S[j] != S[j*(-1)-1]:
            count += 1


else:
    for k in range(int((mojisuu - 1)/2)):
        if S[k] != S[k*(-1)-1]:
            count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()
n = int(len(s))
rev = s[::-1]
count = 0

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

print(count)

Submission status: Accepted

Solution code:
S = input()
i = len(S) // 2 #回文にするためには、文字列の両端から合っているかチェックすれば良い

cnt = 0
for x in range(i):
    # S[-1]が一番最後の文字
    if S[x] != S[-(x + 1)]:
        cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
str = input()
n = int(len(str)/2)
count = 0
for i, x in enumerate(str):
    if i >= n: break
    if str[-i-1] != x: 
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()
cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(s):
    n = len(s) // 2
    return str(sum(s0 != s1 for s0, s1 in zip(s[:n], s[::-1][:n])))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

cnt = 0
b = int(len(s))

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

Submission status: Accepted

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

t = l/2

t = int(t)
f = s[:t]
r = s[t:]
r = r[::-1]
f = list(f)
r = list(r)

c = 0
for i in range(t):
    if f[i] != r[i]:
        c +=1
    else:
        pass
print(c)

Submission status: Accepted

Solution code:
a = input()
list(a)
i = 0
j = len(a)-1
count = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

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

Submission status: Accepted

Solution code:
s = input()

ans = 0
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[-i-1]:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

l = len(s)
sen = l // 2
c = 0

for i in range(sen):
  s1 = s[i]
  s2 = s[l-i-1]
  
  if s1 != s2:
    c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

cnt = 0
for elem1, elem2 in zip(s, reversed(s)):
  if elem1 != elem2:
    cnt += 1
print(cnt // 2)

Submission status: Accepted

Solution code:
strings = input()

lenstrings = len(strings)
res = 0

for i in range(lenstrings // 2):
    if strings[i] != strings[lenstrings-i-1]:
        res += 1

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
mid=len(s)//2
cnt=0
for c1, c2 in zip(s[:mid], s[:mid-1:-1]):
    if(c1!=c2):
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict
from copy import deepcopy
import itertools

# 文字列の場合は普通のinput()を使うか下を使う
# input = sys.stdin.readline().rstrip()

S = input()
l = len(S)
#print('l={}'.format(l))
ans = 0
if l % 2 == 0:
    n = l // 2
    #print('n={}'.format(n))
    for i in range(n):
        #print('S[i]={}, S[-i-1]={}'.format(S[i], S[-i-1]))
        if S[i] != S[-i-1]:
            ans += 1
else:
    n = (l - 1) // 2
    for i in range(n):
        if S[i] != S[-i-1]:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
a = input()
len_a = len(a)
if len_a % 2 == 0:
    a1 =  a[:len(a)//2]
    a2 =  a[len(a)//2:][::-1]
else:
    a1 =  a[:len(a)//2]
    a2 =  a[len(a)//2+1:][::-1]
ans = 0
for i in range(len(a1)):
    ans += int(a1[i] != a2[i])
print(ans)

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:
import math
s = list(input())

ans = 0

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

Submission status: Accepted

Solution code:
phi = input()
num = len(phi)
change = 0
for i in range(num):
  if i > num-1-i:
    break
  elif i != num-1-i:
    if phi[i] != phi[num-1-i]:
      change=change+1 
print(change)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

word = input()

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

Submission status: Accepted

Solution code:
s = str(input())
n = int(len(s))
p = s[0 : n//2]
s = s[n//2 : n+1]
hug = 0
s = s[len(s)::-1]
for i, m in zip(s, p):
  if i!=m:
    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 - 1 - i]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

S = list(input())
count = 0

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

print(count)

Submission status: Accepted

Solution code:
S = input()

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

print(count)

Submission status: Accepted

Solution code:
def main():
    S = input()
    
    center = len(S)//2
    F = S[:center]
    B = S[center:][::-1]

    counter = 0
    if not len(F) == len(B): # S is Even
        B = B[:-1]

    for i in range(len(F)):
        if not F[i] == B[i]:
            counter += 1

    print(counter)



main()

Submission status: Accepted

Solution code:
print((lambda s: int(len(list(filter(lambda a: a[0] != a[1], zip(list(s), list(s)[::-1]))))/ 2 ))(input()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
#lang:reverse.py

result = 0
str = input()
#文字数
str_length = len(str)
rev_str = str[::-1]
count = 0

if str_length % 2 == 1:
    count = (str_length -1)/2
else:
    count = str_length / 2


for i in range(int(count)):
    if str[i] != rev_str[i] :
        result = result + 1

print(result)