MARBLES problem overflow

How do i handle the overflow problem in the marbles problem
My code fails for inputs like n = 456 k = 221
Code Link = https://ide.codingblocks.com/s/173957

Hey @guptak the constraints are wrong and the answer will overflow 64 bits, so you need to use the bigint() implementation to avoid overflow. Refer this https://github.com/robinrst/HackerBlocks/blob/master/MARBLES.cpp

If you have any further doubts please feel free to ask ,other wise kindly mark the doubt as resolved

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.