Python, 360 + 360 = 720 bytes 206 + 206 = 412 bytes 201 + 201 = 402
Hi, my two cents. This answer is inspired by this blog by Nat McHugh.
A short introduction to explain the idea behind the code.
Piet, 247 bytes/190 codels
Try it Online!
So, this took far longer than I had anticipated, and I have a few ideas on some other more efficient (more stack-friendly) approaches, but I finally got the ...