getting wrong ans .
ide: https://ide.codingblocks.com/s/213606
MARBLES - mathemtics
@Vishal123 it is said in the problem statement that ans can exist 64 bit limit so you cannot stre in it long long int,so you have to se bigint() for this.
Take a look at its implementation here https://github.com/robinrst/HackerBlocks/blob/master/MARBLES.cpp
And here is the working code using bigInt() https://ide.codingblocks.com/s/195884