here is the link to my solution: https://ideone.com/j3wxQw
Where am I wring
Getting Wrong Answer in 2 test cases MARBLES
Answer can overflow long long int.
Use bigint class of c++.
Refer this -:
Answer can overflow long long int.
Use bigint class of c++.
Refer this -: