This is a generator for puzzles for the math game 24. Your goal is to use all four numbers and basic arithmetic to reach a result of 24. For example, if the numbers are 2, 11, 4, and 8. The solution is (11-8)*2*4. In other words, 11 minus 8 is 3, 3 times 2 is 6, and 6 times 4 is 24. Press space to reroll the numbers. Not all problems are solvable. This program is not a solver.
The numbers are between 1 and 12. I have two checks that the set of numbers must go through before displaying. First of all, to avoid any simple ones, I made sure to reroll them if they all add up to 24. (So, 6 8 3 7 would fail that check.) And I also made sure to avoid having at least 3 of the same number, or having two pairs of duplicates.