input

1 2 3 4 5 (we don’t know the size)

7 6

6 3 5 4 2

.

.

.

Output:

10(sum of numbers)

13

27

.

.

.

Here we don’t know the number of test cases

And We also don’t know how many numbers to input for each test case

Can anyone provide a Solution for it in JAVA

I was trying to solve it but not able to solve it