#C9466. Minimal Changes to Form a Palindrome
Minimal Changes to Form a Palindrome
Minimal Changes to Form a Palindrome
Given a string s, determine the minimal number of single-character changes needed to transform s into a palindrome. A palindrome is a string that reads the same forwards and backwards. Formally, you need to compute the number of indices i (where \(0 \leq i < \lfloor \frac{n}{2} \rfloor\)) such that \(s_i \neq s_{n-i-1}\), where \(n\) is the length of the string.
For example, for the string "abc", one change is needed (change either 'a' to 'c' or 'c' to 'a') to make it a palindrome.
inputFormat
The input is given via stdin as a single line containing the string s (with no spaces).
outputFormat
Output a single integer to stdout representing the minimal number of character changes required to convert the given string into a palindrome.
## sampleabc
1