#C5090. Palindrome Checker
Palindrome Checker
Palindrome Checker
Palindrome Checker
Given a string s, determine whether it is a palindrome. The check is case-insensitive and ignores spaces, punctuation, and any non-alphanumeric characters.
Mathematically, let \(S\) be the string obtained by removing all non-alphanumeric characters from s and converting it to lowercase. The string is a palindrome if and only if \(S = S^{\text{rev}}\), where \(S^{\text{rev}}\) represents the reverse of \(S\).
inputFormat
The input consists of a single line containing the string s to check. The string may include spaces, punctuation, and can be empty.
outputFormat
Output a single line: True
if the input string is a palindrome according to the specified rules, and False
otherwise.
Able, was I ere I saw Elba
True