Solving mathematical puzzles with brute-force and Perl
After talking a lot about optimizations and selecting the right algorithm, here is a little brute-force code. This particular one gives the answer to the following puzzle from Richard Wiseman’s Blog (one well worth following BTW):
more ...Can you make the number 24 with the number 5, 5, 5, and ...