Showing Only one test case right

@mohit26900,
the test cases have big numbers ans to which cant be stored in any data type like it may have 40 digits so this approach will not work you can use array to store each digit

refer to this : https://ide.codingblocks.com/s/656262

dry run for same algo:-

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.