0.0.7 • Published 9 years ago
solve24 v0.0.7
solve24
Solves 24® Game cards (https://www.24game.com/)
Usage
From the browser or Node (supports CommonJS, AMD, and globals):
> solve24([1, 4, 5, 6]).forEach(function (bc) {
... console.log(bc.toString());
... });
6 / ((5 / 4) - 1)
As a shell script:
$ npm install -g solve24
$ solve24 1 2 3 4 | head -n5
(1 + (2 + 3)) × 4
((1 + 2) + 3) × 4
(1 + 3) × (2 + 4)
(1 + (3 + 2)) × 4
((1 + 3) + 2) × 4