Short Groovy scripts to solve combination puzzles.
Useful closures that help managing and filtering lists and maps.
Solves the following puzzle:
EINS
+ ZWEI
+ DREI
-------
= SECHS
(For those not understanding german: it means "one + two + three = six" - which is of course true.) But the above is also true if each of the letters stands for a digit (same letters mean same digit, and different letters mean different digits).
The script prints all solutions and then answers the question:
What number does 'EHI' stand for?