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

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

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

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

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
 
c=0
i=0
while i<n-i-1:
  if s[i]!=s[n-i-1]:
    c+=1
  i+=1
print(c)
s=input()
n=len(n)
 
c=0
i=0
while i<n-i-1:
  if s[i]!=s[n-i-1]:
    c+=1
  i+=1
print(c)
提出情報

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = str(input())

s[0] = s[-1]

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

int main () {
   string S;
   cin>>S;
   int a=S.length(),x=0;
   for(int i=0;i<a;i++){
       if(S[i]!=S[a-i-1]);{
           x++;
       }
   }
   x=(x-(x%2))/2;
   cout<<x;
   return 0;   }

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

ans = 0

rs = s.copy()
rs = rs[::-1]

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

Submission status: Runtime Error

Solution code:
import sys
import math

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

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

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

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(s):
            return ans_g
    return l
if len(s) % 2 == 0:
    print(gusu(s))
else:
    print(kisu(s))

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:
s = input()

l = len(s)//2
if len(s)==1:
    print(0)
    exit()
elif l%2==0:
    s1 = s[:l]
    s2 = s[l:]
else:
    s1 = s[:l]
    s2 = s[l+1:]

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

Submission status: Runtime Error

Solution code:
s = input()

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
if n%2!=0:
    lista=[]
    s1=s[0,(n-1)//2]
    s2=s[(n+1)//2,n]
    s3=s2[::-1]
    for p in range((n-1)//2):
        if s1[p]!=s3[p]:
            lista.append(p)
    print(len(lista))
else:
    listb=[]
    s4=s[0:n//2]
    s5=[n//2:n]
    s6=s5[::-1]
    for q in range(n//2):
        if s4[q]!=s6[q]:
            listb.append(q)
    print(len(listb))

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
if n%2!=0:
    lista=[]
    s1=s[0,(n-1)//2]
    s2=s[(n+1)//2,n]
    s3=s2[::-1]
    for p in range((n-1)//2):
        if s1[p]!=s3[p]:
            lista.append(p)
    print(len(lista))
else:
    s4=s[0:n//2]
    s5=[n//2:n]
    s6=s5[::-1]
    for q in range(n//2):
        if s4[q]!=s6[q]:
            listb.append(q)
    print(len(listb))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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)

Submission status: Runtime Error

Solution code:
S = input()

count=0

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

print(count)

Submission status: Runtime Error

Solution code:
S = input()

count=0

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

print(count)

Submission status: Runtime Error

Solution code:
s = input()
rs = reversed(s)
count = 0

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

Submission status: Runtime Error

Solution code:
S = input()
RS = reversed(S)

count=0

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

print(count)

Submission status: Runtime Error

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((t-1)/2):
    if s[_]!=s[t-1-_]:
      d+=1
    print(d)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(input())

length = len(s)

n = length//2

m = 0

for i in range(length):
  x = (i+1)*(-1)
  if s[i]==s[k]:
    m += 1
print(m)

Submission status: Runtime Error

Solution code:
S = list(input())
n = len(S)
R = S[:n/2]
L = S[:(n/2)-1:-1]
cnt = 0

for r, l in zip(R, L):
  if r != l:
    cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
S = list(input())
n = len(S)
R = S[:n/2]
L = S[:(n/2)-1:-1]
cnt = sum([1 for (r,l) in zip(R,L) if r != l])
print(cnt)

Submission status: Runtime Error

Solution code:
S = list(input())
n = len(S)
R = S[:n/2]
L = S[-1:(n/2)-1:-1]
cnt = sum([1 for r,l in zip(R,L) if r != l])
print(cnt)

Submission status: Runtime Error

Solution code:
S = list(input())
n = len(S)
R = S[:n/2]
L = S[-1:n/2:-1]
cnt = sum([1 for r,l in zip(R,L) if r != l])
print(cnt)

Submission status: Runtime Error

Solution code:
s = input()
a = s.split()
count = 0
j = len(s)
for i in range(j):
  if i<=j:
  	if a[i] != a[j-i-1]:
    	count += 1 
print(count)

Submission status: Runtime Error

Solution code:
s = input()
a = s.split()
count = 0
j = len(s)
for i in range(j):
  if i<j:
  	if a[i] != a[j-i-1]:
    	count += 1 
print(count)

Submission status: Runtime Error

Solution code:
s = input()
a = s.split()
count = 0
j = len(s)
for i in range(j):
  if a[i] != a[j-i-1]:
    count += 1 
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
v

Submission status: Runtime Error

Solution code:
s = int(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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

def palind(word):
  word = word.lower()
  return word[::-1] ==word

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

print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
//aaaaa
aaaaaa//

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
cnt = 0
white(True):
  if(len(s)<=1):
    break

  if(s[0] != s[-1]):
    cnt+=1
  s = s[1:-1]

  
print(cnt)

Submission status: Runtime Error

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

#listを一文字ずつのlistに
S_list = list(S)

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

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 +=0
print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input())
s, t = map(str,input().split())
ans = ""
for i, j in zip(s,t):
  ans += i
  ans += j
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

num = 0

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

Submission status: Runtime Error

Solution code:
s = input()
print(len(list(set(s)))-len(s)//2 if len(s)%2 == 0 else len(list(set(s))-len(s)//2+1)

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <string.h>
char s[101];
int main(void)
{
    scanf("%s",s);
    int res = 0;
    int i;
    int n = strlen(s);
    for (i=0;i<n;i++)
    {
        if (s[i] != s[n-i-1]) res++;
    }
    printf("%d\n",res/2);
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

S = input()


if len(S)%2 != 0:
	s = S[0:int(len(S)/2-1)]+S[int(len(S)/2-1)+1:]

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

print(count)

Submission status: Runtime Error

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

S = input()

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

print(count)

Submission status: Runtime Error

Solution code:
from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin


def ii(): return int(stdin.readline())


def fi(): return float(stdin.readline())


def mi(): return map(int, stdin.readline().split())


def fmi(): return map(float, stdin.readline().split())


def li(): return list(mi())


def lsi():
    x=list(stdin.readline())
    x.pop()
    return x


def si(): return stdin.readline()


def sieve(x):
    a=[True]*(x+1)
    sq=floor(sqrt(x))
    for i in range(3, sq+1, 2):
        if a[i]:
            for j in range(i*i, x+1, i):
                a[j]=False
    if x>1:
        p=[2]
    else:
        p=[]
    for i in range(3, x+1, 2):
        if a[i]:
            p.append(i)
    return p
#vowel={'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'}
#pow=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
############# CODE STARTS HERE #############
a=lsi()
s, e=0, len(a)-1
c=0
while s<e:
    if a[s]!=a[e]:
        c+=1
    s+=1
    e-=1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s_input = input()
s = list(s_input)
s_reverse = list((reversed(s_input)))

count = 0
for i in range(int(len(s)/2)):
    if s[i] != s_reverse[i]int(x)
        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++

print(count)

Submission status: Runtime Error

Solution code:
s = input()
rev_s = reverse(s)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S, T = input().split()
ans = str()
for i in range(N):
    ans += (S[i])
    ans += (T[i])
print(ans)

Submission status: Runtime Error

Solution code:
Jupyter Notebook
0temp-Copy3
(autosaved)
Current Kernel Logo
Python 3 
File
Edit
View
Insert
Cell
Kernel
Navigate
Widgets
Help

7
ABC147
from ipywidgets import Textarea
import io
​
if 'open' in globals():
    del open
if 'input' in globals():
    del input
​
original_open = open
​
class custom_open():
    def __init__(self):
        self.text = ''
​
    def __call__(self, file, *args, **kwargs):
        if file == 0:
            return io.StringIO(self.text)
        return original_open(file, *args, **kwargs)
​
    def updater(self, change):
        self.text = change["new"]
​
class custom_input():
    def __init__(self):
        self.__sio = io.StringIO('')
        self.shell = get_ipython()
        if self.shell.events.callbacks['pre_run_cell'] != []:
            self.shell.events.callbacks['pre_run_cell'] = []
        self.shell.events.register('pre_run_cell', self.pre_run_cell)
​
    def __call__(self):
        return self.__sio.readline().strip()
​
    def pre_run_cell(self, info):
        text = self.shell.user_ns.get('text_area', None).value
        self.__sio = io.StringIO(text)
​
open = custom_open()
input = custom_input()
​
text_area = Textarea()
text_area.observe(open.updater, names='value')
display(text_area)
vvvvvv
### B - Palindrome-philia
s = input()
​
n = len(s)
if n % 2 == 1:
    front = s[:(n//2 - 1)]
    rev = front[::-1]
    end = s[(n//2 - 1):]
else:
    front = s[:(n//2)]
    rev = front[::-1]
    end = s[(n//2):]
​
res = 0
for i in range(n//2 - 1):
    if rev[i] != end[i]:
        res += 1
print(res)
0
rev
'cder'
end
'oder'

Submission status: Runtime Error

Solution code:
s = list(input())

if len(s) % 2 != 0:
  if len(s) / 2 > len(s)//2:
    s.pop(len(s)//2+1) 
  else:
    s.pop(len(s)//2-1) 
    

s1List = s[:len(s)//2][::-1] 
s2List = s[len(s)//2:]

count = 0
for i in range(len(s1List)):
  if s1List[i] != s2List[i]:
    count += 1
  
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=a
c=b.reverse()
d=0
for i in range(a):
  if a[i]!=b[i]:
    d+=1
  else:
    pass
print(d)

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
n = N // 2
A = 0

if N % 2 == 0:
  T = S[:n]
  U = S[n::-1].reverse()
print(T)
print(U)

Submission status: Runtime Error

Solution code:
str_original = input()
N = len(str_original)
loop = floor(N/2)

count = 0
for i in range(loop):
  if str_original[i] != str_original[N-i]:
     count+= 1
      
return count

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
count = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input().rstrip()
l = len(s)
half_len = int(l/2)

if l%2 != 0:
	s = s.replace(s[half_len], "")
	fst_half = s[:half_len]
	snd_half = s[half_len:]
else:
	fst_half = s[:half_len]
	snd_half = s[half_len:]

snd_half = snd_half[::-1]

count = 0
for i in range(half_len):
	if(snd_half[i] != fst_half[i]):
		count += 1

print(count)

Submission status: Runtime Error

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

if l%2 != 0:
	s = s.replace(s[half_len], "")
	fst_half = s[:half_len]
	snd_half = s[half_len:]
else:
	fst_half = s[:half_len]
	snd_half = s[half_len:]

snd_half = snd_half[::-1]

count = 0
for i in range(half_len):
	if(snd_half[i] != fst_half[i]):
		count += 1

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
kaibun = input()
i=0
count = 0
while i+1<=len(kaibun)/2:
  if kaibun[i]!=kaibunn[-i-1]:
    count+=1
  i+=1

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
treat = input()

acc = 0
hugs = 0

for i in len(treat):
	if treat[acc] = treat[len(treat) - acc]:
		acc = acc + 1
	else:
		hugs = hugs + 1
		acc = acc + 1

print(hugs)

Submission status: Runtime Error

Solution code:
treat = input()

acc = 0
hugs = 0

for i in len(treat):
	if treat[acc] = treat[len(treat) - acc]:
		acc = acc + 1
	else:
		hugs = hugs + 1
		acc = acc + 1

Submission status: Runtime Error

Solution code:
S = str(input())
s = list(S)
g= []
m = len(s)//2
ans = 0
for i in range(m):
  if(s[i]==s[lens-1-i]):
    None
  else:
    ans+= 1
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
 
ans = 0
for i in range(len(s)):
  for j in list(range(len(s)))[::-1]:
    if j < i:
      return ans
    else:
      if s[i] != s[j]:
        ans += 1

Submission status: Runtime Error

Solution code:
s = input()

ans = 0
for i in range(len(s)):
  for j in list(range(len(s)))[::-1]:
    if j < i:
      return ans
    else:
      if s[i] != s[j]:
        ans += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

Solution code:
a=input()
b=len(a)
i=0
j=0
while i <= b//2 :
	if a[i] != a[b-i-1]:
	j +=1
else:
	print(j)

Submission status: Runtime Error

Solution code:
a=input()
b=len(a)
i=0
j=0
while i <= b//2 :
	if a[i] != a[(b-i-1)]
	j +=1
else
print(j)

Submission status: Runtime Error

Solution code:
a=input()
b=len(a)
i=0
j=0
while i <= b//2
	if a[i] != a[b-i]
	j +=1
else
	print(j)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
if S.islower():
	S1 = S[:int(len(S)/2)]
    S2 = S[int(len(S)/2):]
    count = 0
    for i,x in enumerate(S1):
        if x != S2[(i+1)*-1]:
            count += 1
    print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = [input().split()]
t=0
for i in range(int(len(a)/2)):
  if(a[i]=a[-(i+1)]):
  else:
     t += 1

print(t)

Submission status: Runtime Error

Solution code:
s = list(input())
if len(s) % 2 == 0:
  a = int(len(s)/2)
  s1 = s[:a]
  s2 = s[a:].reverse()
  c = 0
  for i,j in zip(s1,s2):
    if i != j:
      c += 1
  print(c)
else:
  a = len(s)//2
  s1 = s[:a]
  s2 = s[a+1:].reverse()
  c = 0
  for i,j in zip(s1,s2):
    if i != j:
      c += 1
  print(c)

Submission status: Runtime Error

Solution code:
s = list(input())
if len(s) % 2 == 0:
  a = len(s)/2
  s1 = s[:a]
  s2 = s[a:]
  c = 0
  for i,j in zip(s1,s2):
    if i != j:
      c += 1
  print(c)
else:
  a = len(s)//2
  s1 = s[:a]
  s2 = s[a+1:]
  c = 0
  for i,j in zip(s1,s2):
    if i != j:
      c += 1
  print(c)

Submission status: Runtime Error

Solution code:
import sys


def main():
    n = input()
    n = int(n)
    l = {}
    lR = {}
    l = list(sys.stdin.readline().split())
    lR = l[::-1]
    givenLen = len(l)
    if l == lR:
        return 0

    temp = {}
    temp[0] = 0
    for i, e in enumerate(l):
        temp[i+1] = e
    l = dict(temp)
    temp = {}
    temp[0] = 0
    for i, e in enumerate(lR):
        temp[i+1] = e
    lR = dict(temp)

    LCStable = [[0 for _ in range(givenLen+1)]]*(givenLen+1)

    for i in l:
        for j in lR:
            if i==0 or j==0:
                LCStable[i][j]=0
            elif l[i]==lR[j]:
                LCStable[i][j]=LCStable[i-1][j-1]+1
            else:
                LCStable[i][j]=max(LCStable[i][j-1],LCStable[i-1][j])
    # print(LCStable)
    return givenLen-LCStable[-1][-1]


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

print(main())

Submission status: Runtime Error

Solution code:
s = input()

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

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
S = str(input())
len = len(S)

count = 0
for i in range(len):
  while count > len/2 or i == len:
	if S[i] != S[len-i]:
    	count += count
if count < len/2:
  print(count)
else:
  print(math.floor(len/2))

Submission status: Runtime Error

Solution code:
s = input()

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

print(count)

Submission status: Runtime Error

Solution code:
a=input()
bef,aft = a[:int(len(a)/2)], a[-int(len(a)/2):]
l = len(bef)
cnt = 0
for i,m in enumerate(aft):
  if m != bef[l-i-1]:
    cnt+=1
print(cnt)