Marbles Question

Can you tell me why all these test cases except Test case 4 are failing, I have taken care of edge cases

Is any TA connected?

hey @duttrohan0302
it is told in the problem statement that ans can exceed 64 bit int limit hence you cannot store ans in long long int ,you have to use bigint() here
Take a look at its implementation here

I cannot understand the approach, can you explain what you’re trying to do. I got that your are trying to implement a large number as a string right?

@duttrohan0302 If you are using c++ , then one way of doing this is by using array to store numbers , what i mean by this is to use store large numbers in array digit per block and devise algorithm for their multiplication and division
you can refer the following post : -