Replace them all ...in this problem one test case is not passing?

question- https://hack.codingblocks.com/contests/c/255/67
my code: https://ide.codingblocks.com/s/45158

https://ide.codingblocks.com/s/45171 declare sum to be long long