Marbles problem In Mathematics section

I am not able to run my code correctly for all test cases can you help me to tell me error where I got wrong for all those test cases.

@Love hey can I see your approach ?

yes


code is saved on coding blocks ide

@Love hey love use star and bars technique to solve this question and implemented this question in python or use biginteger class of c++

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.