MARBLES problem

I am getting wrong answer while submitting the code although the answer is correct. https://ide.codingblocks.com/s/47179
Please anyone help me with this!!!