Test cases not passing

not able to find out why test case are not passing here is my code https://ide.codingblocks.com/s/367824

here is one sample test case.
INPUT:
1
4
0 90 32 9009

EXPECTED OUTPUT: 909009320
try to debug with this