#K12146. Element-wise Sum and Adjust
Element-wise Sum and Adjust
Element-wise Sum and Adjust
You are given two arrays of integers of the same length. For each index i, compute the sum s = ai + bi. If s is odd (i.e. if \(s \mod 2 \neq 0\)), then replace it with \(s+1\) (the next even number). Output the resulting array with its numbers separated by a single space.
The input is read from standard input and the output is written to standard output.
inputFormat
The first line contains a single integer \(n\) representing the number of elements in each array. The second line contains \(n\) space-separated integers representing the first array. The third line contains \(n\) space-separated integers representing the second array.
outputFormat
Output a single line with \(n\) space-separated integers which are the element-wise adjusted sums of the two arrays.
## sample3
1 2 3
4 5 6
6 8 10
</p>