Solution to CANDY1 in Python

4.5M, 0.32s