#C6830. Palindrome Check
Palindrome Check
Palindrome Check
Given a string S, determine whether it is a palindrome. In this problem, only alphanumeric characters are considered and case is ignored. A string is said to be a palindrome if it reads the same backward as forward after filtering out non-alphanumeric characters.
For example, the string "A man, a plan, a canal: Panama" is a palindrome because if we remove all non-alphanumeric characters and convert to lowercase, it becomes:
\( amanaplanacanalpanama \)
which is the same as its reverse. Your task is to check whether the input string satisfies this property.
inputFormat
The input consists of a single string S provided via standard input (stdin). The string may contain spaces, punctuation, and mixed case letters.
outputFormat
Output True
if the filtered string is a palindrome; otherwise, output False
. The output should be printed to standard output (stdout).
A man, a plan, a canal: Panama
True