Getting correct outputs abut judge is saying wrong answers . Code is linked in description . please check it!

link to my code :

@Arnav7
consider this testcase
1
4
15 5 -2 -5
Output should be “20” (15+5) but your code is giving “18” . please check your logic and dry run your code for this testcase.