Mean Words
Time limit1sMemory limit1024 MB
Given N words, build one word by taking the floor of the average ASCII value at each position across the words that reach that position.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Little Timmy got caught by his teacher for using some mean words. After he was sent to the principal, Timmy learned his lesson. Next time, he wants to make sure he does not get caught.
Timmy takes all the mean words he plans to say and combines them into a single mean word. He goes through each position in turn. For each position, he averages the characters in that position across all the words that have a character there, rounds the average down, and uses the resulting character.
The value of a character is its ASCII value. The value of a is , the value of b is , and so on up to z, which has value . Average the ASCII values, round down to the nearest integer, and use the character with that value.
Input
The first line contains a single integer (), the number of words. Each of the next lines contains a single word of between and lowercase English characters.
Output
Output the mean word that Timmy builds by following the procedure above.