Nimble Robotics Interview Question

Create a solver for 24