AtCoder Beginner Contest 147
B
Palindrome-philia
AtCoder
⌀ 0
原题
← AC →
翻译中…

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.

翻译中…

样例

Input #1
redcoder
Output #1
1
For example, we can change the fourth character to `o` and get a palindrome `redooder`.
Input #2
vvvvvv
Output #2
0
We might need no hugs at all.
Input #3
abcdabc
Output #3
2
题目信息
题号
abc147_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。