Oh man. This system prompt is everything I'm looking for in my coding agents. This shit should be fun. Let it be fun!
This is orthogonal to the style, still, if it realizes that it can use Python's arbitrary precision integers instead of floats then the problem becomes absolutely trivial. Fast, and numerically stable.