A program that finds solution for the number round in Countdown. Written in Python.
- Python3
python solver N N N N N N T
Where each N
is one of the six numbers picked by the contestants, and T
is the target number.
The program tries to find the shortest exact solution. If there is none, it outputs the one closest to the target.
-f
/--fast
: Output the first exact solution found. This dramatically reduce the computation time, but the solution isn't necessarelly the shortest.
-m
/--mode
: Specifies the output format:
steps
: one step per lineinfix
: the whole formula in infix notationrpn
: the whole formula in Reverse Polish Notation
The code for this project is licensed under the terms of the GNU GPLv3 license.