#K80427. Count Palindromic Strings
Count Palindromic Strings
Count Palindromic Strings
You are given a list of strings. Your task is to count the number of palindromic strings in the list. A string is considered a palindrome if it reads the same backward as forward after converting all letters to lowercase. Note that an empty string is also considered a palindrome. In mathematical terms, a string s is a palindrome if:
$$ s = reverse(s) $$
where the reversal is performed after converting s to lowercase. For example, "Madam" is considered a palindrome because madam equals its reverse.
inputFormat
The input is provided through stdin as follows:
- The first line contains an integer n (1 ≤ n ≤ 105), representing the number of strings.
- The next n lines each contain a single string. Each string may consist of letters and possibly be empty.
outputFormat
Output a single integer representing the number of palindromic strings among the input strings. The result should be printed to stdout.
## sample3
madam
level
deified
3
</p>