SUBTRACTION (A2OJ) - Need help

implementation
recursion

#1

Hello Coders,

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


#2

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


#3

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