#C11863. Even Concat
Even Concat
Even Concat
Given an integer \(n\) and an array of \(n\) integers, your task is to identify all the even numbers in the array and replace each even number with the string "even". Then, concatenate all these "even" strings together (without any separator) and output the resulting string.
Example:
- If the input is
5
and the array is[1, 2, 3, 4, 5]
, the output should beeveneven
. - If the input is
3
and the array is[7, 11, 13]
, there is no even number, so the output should be an empty string.
Note: The program should read input from standard input (stdin) and output the result to standard output (stdout).
inputFormat
The first line of input contains a single integer \(n\), representing the number of elements in the array. The second line contains \(n\) space-separated integers.
Example:
5 1 2 3 4 5
outputFormat
Output a single string which is the concatenation of the word "even" for every even number found in the array. If there are no even numbers, output an empty string.
## sample5
1 2 3 4 5
eveneven