Problem E
Walrus Weights
Wallace the Weightlifting Walrus is training for a contest
where it will have to lift
In case there exist two such numbers which are equally close
to
Help Wallace the Weightlifting Walrus and tell it which weight it will have to lift.
Input
The first line of the input contains the number of plates
Output
Output one integer, the combined weight closest to
Sample Input 1 | Sample Output 1 |
---|---|
4 900 500 498 4 |
1002 |
Sample Input 2 | Sample Output 2 |
---|---|
1 1 |
1 |