• + 4 comments

    I recommend avoiding Python when solving this problem. I couldn't solve the problem without reaching maximum recursion depth in Python. I consulted with the Editorial and the provided solution does in fact cause such an error when converted to Python.