Wrong answer(partial test cases passing)

Code Id : https://ide.codingblocks.com/s/206153

For Marbles Question
where solution is n-1Ck-1