More code

# Krypto Solver

Krypto is a card game distributed by the same people that
made 'Set'. You deal 6 cards face up on the table, and all
participants try to take the first 5 cards, applying mathematical
operations in order to come up with the 6th number.

e.g. if you were
given 1,2,3,4,5,6, one solution would be: (5 - 4) * 3 + 2 + 1 = 6

The creators of the game say that there is a really small number of
sets of cards that form impossible solutions, but sometimes the
solutions are hard to think of, so I created this script to check. (in
the 1,2,3... example above, there are 1751 solutions, although my
script isn't smart enough to know that 1+2 and 2+1 are the same solution.)

Get it? Enter some numbers below, and let me calculate them for
you.

## Enter the 5 numbers and the solution below

©2004-2022 The Daleys

Change history:

- Summer 2004: Created
- April 2007: Added parenthesizing (Thanks to John Kelderhouse for noticing that I was missing solutions)
- June 2011: Added system load checker, since this solver is still popular after all of these years!
- March 2013: Removed the 'find all' choice, since the point is not really to find all solutions, but to check for non-existent solutions. Removed the 'load checker', since perhaps without the 'find all' feature, this script shouldn't take as long to run
- August 2013: Don't allow intermediate solutions that contain negative numbers, because Charles Hansell (thanks!) says Krypto rules forbid that.