After several attempts, I was finally able to get AC as well but my time leaves something to be desired on this one for sure - about 4.5 seconds.
I really had to think of a lot of corner/edge cases so it was a good exercise.
I originally was getting quite a few TLE but I think (...?) that was because of the str-to-int conversions and calculations I was unwisely doing on potentially huge numbers (10^6 digits).
My AC solution had a minimal number of those conversions, and then only for single digits. I wonder how much it would improve if it were possible to eliminate ALL conversions and implement a pure string-only solution.
I think the next things I will do will be to:
-> experiment with large integer conversion and calculation
-> investigate eliminating all conversions
-> revisit my algorithm (i.e. string slicing and my custom carry function)