Palindrome-philia

AtCoder
IDabc147_b
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
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
API Response (JSON)
{
  "problem": {
    "name": "Palindrome-philia",
    "description": {
      "content": "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$. Fin",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc147_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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.\nGiven is a string $S$. Fin...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments