SUBTRACTION (A2OJ) - Need help

Hello Coders,

I am trying to solve https://a2oj.com/p?ID=129 problem from A2OJ. Here is my solution https://a2oj.com/submission?ID=245865. I am not able to get why I am getting WA. Help would be appreciated. Thanks.

check your output for this TC
1
2 100 5 5 5 5
for this output could be 2-(100-5-5-5-5) = 2-80=-78.
your output : -88.

simple solution : https://pastebin.com/iXew6cUA

Thanks. I will check you code. But what is wrong with my code?