It's a shame that all this works flawlessly in Python, but the runtime makes everything prohibitively slow.
ya python makes dealing with huge integers so simple it almost feels like you're cheating. would that every programming language could be like python in that way.