Why this code is giving runtime error on single test case (question included)
Code is absolutely fine! Just 1 edge case you have not handled is what if n=0?
then simply gcd is 0.
it will not be zero it will be the string of number m
1 Like
Yes my mistake, it would be the other number!
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.