#K50017. Palindromic Strings Count

    ID: 28771 Type: Default 1000ms 256MiB

Palindromic Strings Count

Palindromic Strings Count

You are given a list of strings. Your task is to count how many of these strings are palindromes when only their alphanumeric characters are considered. In other words, ignore spaces, punctuation, and case when checking for palindromes.

A string is a palindrome if it reads the same backward as forward after removing all non-alphanumeric characters and converting all letters to lowercase. For example, "A man, a plan, a canal, Panama!" is a palindrome.

Please implement a solution that reads from standard input (stdin) and prints the result to standard output (stdout).

Note: An empty string is considered a palindrome.

inputFormat

The input is given via standard input. The first line contains an integer N which represents the number of strings. Each of the following N lines contains a string. The strings may include spaces, punctuation, and mixed case letters.

outputFormat

Output a single integer representing the number of palindromic strings in the list, considering only alphanumeric characters and ignoring case.

## sample
3
A man, a plan, a canal, Panama!
No lemon, no melon
Hello, World!
2

</p>