Sum it up problm

https://ide.codingblocks.com/s/42589

https://hack.codingblocks.com/contests/c/512/912

why is it showing 3 wrong cases on submission

Hey Jai, your code is not correct. Check for this test case
input :
15
78 7 62 28 73 68 94 88 65 61 59 21 92 4 97
90

output :
4 21 65
7 21 62
28 62

but your code’s output is
1 2 2 6 7
1 2 4 5 6
2 2 6 8

For further help you can once go through the code.Hope it helps.
Also comments has been added.
code link: https://ide.codingblocks.com/s/42631