#C11. Count Palindromes in an Array of Strings
Count Palindromes in an Array of Strings
Count Palindromes in an Array of Strings
You are given a list of words. Your task is to count how many of these words are palindromes. A palindrome is a string that reads the same forward and backward. Note that the comparison is case-sensitive. For example, "racecar" is a palindrome, but "Racecar" is not.
Examples:
- Input: ["racecar", "hello", "madam", "world", "level"] → Output: 3
- Input: ["noon", "wow", "java", "kayak", "python"] → Output: 3
inputFormat
The input is provided via standard input (stdin). The first line contains an integer n representing the number of words. The following n lines each contain a single word.
outputFormat
Output a single integer representing the count of palindromic words among the given input.
## sample5
racecar
hello
madam
world
level
3