#C1413. Palindrome Checker

    ID: 43745 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

Given a string s, determine whether it is a palindrome. A palindrome is a string that reads the same forward and backward when ignoring spaces, punctuation, and differences in case. In this problem, you are required to remove all non-alphanumeric characters and convert all letters to lowercase before checking if the string is a palindrome.

For example, the string "A man, a plan, a canal, Panama" is a palindrome, while "Hello, World!" is not.

Note: An empty string or a string with a single character is considered a palindrome.

inputFormat

The input is provided via standard input (stdin) as a single line containing the string to check.

outputFormat

Output either "True" or "False" (without quotes) on standard output (stdout) depending on whether the input string is a palindrome after processing.## sample

A man, a plan, a canal, Panama
True