#K88197. Modify Numbers
Modify Numbers
Modify Numbers
Given a list of integers, modify each integer according to the following rule: if an integer is odd, double its value; if it is even, leave it unchanged. Formally, for each integer (x), the output is (2x) if (x) is odd, otherwise (x) itself if it is even.
For example, if the input list is [1, 2, 3, 4, 5], the output will be [2, 2, 6, 4, 10].
inputFormat
The first line of the input contains an integer (n) denoting the number of elements in the list. The second line contains (n) space-separated integers.
outputFormat
Output a single line containing (n) space-separated integers after applying the modification rule.## sample
3
1 3 5
2 6 10