Ruby Solver for NUM: Insanely Hard Math Game