You are given an array of size where is a positive integer at position.. Find out the maximum sum of the elements that can be obtained which is not even. If the sum can never be not even return
Task
Find out the maximum sum of the elements that are not even.
Example
Approach:
First, we find the sum of all the elements which in this case is . Since the sum is odd and we have to find the maximum sum that is not even, it is the final answer.
Function description
Complete the function solve provided in the editor. This function takes the following two-parameter and returns the required answer:
: number of elements in the array.
: a list containing positive integers.
Input Format:
The first line contains an integer denoting the number of test cases
For each test case:
The first line contains the integer , the size of the array
The second line contains the spaced positive integer values.
Output Format:
For each test case, print the answer in a new line.
Constraints:
First we find sum of all the elements of the array which is . Since the sum is odd and we have to find the maximum sum that is not even it is the final answer