Tool to solve countdown numbers games automatically, e.g. to find a given number by performing operations on other numbers.
Countdown Numbers Game - dCode
Tag(s) : Number Games
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Numbers Round in the TV Game Show Countdown is a mathematical game whose objective is to get a target number (generally between 101 and 999) with the four elementary operators (+, -, Ă—, Ă·) and a list of randomly picked numbers.
To find the solutions to a random number, the only method is an exhaustive search that tests all possible combinations. The number of calculations increases exponentially, making a complete exploration expensive for a computer and difficult to perform mentally.
To speed up manual calculations, two heuristics are particularly useful:
— approaching the target result using multiplication, then adjusting with smaller numbers by addition or subtraction;
— decomposing the target number, or a close number, into two or three factors to guide the operations.
These methods do not guarantee finding a solution, but they significantly reduce the number of possibilities to examine.
The original solver uses the rules of the TV Countdown game show with 6 number tiles (all natural integers not null), calculations use +, -, *, / operators but avoid non integer divisions (leading to decimal numbers).
Example: Find 123 with 4,5,6,7,8,9. In 3 operations:
8 + 5 = 13; 13 x 9 = 117; 117 + 6 = 123.
The advanced solver allows more options, constraints on operators, number of operations, etc. It also proposes to generate a list of all possible results from given numbers.
Example: Find 24 by using all numbers 5,5,5,1 and allowing non integers values:
1 / 5 = 0.2; 5 - 0.2 = 4.8; 5 x 4.8 = 24
The N-Numbers solver uses original rules but with any quantity of numbers. Given result is not the easiest one, a random one. The computation time can explode (billions of iterations) and, if no solution exists, the search never ends.
There are three main types of algorithms for solving this number game:
Example: The numbers are 2, 5, 10
Recursive search: make all calculations with N numbers. It uses 2 numbers and for each operation, retry with the results and the N-2 remaining numbers. This method explores the entire tree of possible calculations but presents an exponential complexity.
Example: Take 2 and 5, make an addition: 2+5=7, a subtraction, 5-2 = 3, etc. Take the result 7 (ou 3), and unused numbers: 10, and start over. 7+10 = 17, etc.
Search with cache: same as the previous one, but stores the calculation to avoid remake them. This speeds up the search but consumes more memory.
Example: Take 2 and 5, see if results are already known for addition 7, and subtraction 3, etc. Go on more quickly.
Random search (or Monte Carlo): can find a solution quickly but do not make all calculations, it can prove that a solution exists, but not that a solution does not exist.
Example: Take 2 random numbers 5 and 10, make a random operation: multiplication, store the result: 5*10=50 and go on with remaining results: 2 and 50
Negative numbers are mostly ignored because they do not influence resolution. Indeed apply the operator - (minus) in front of any negative number to make it positive.
Example: Numbers 3,2,-1 and target 7, calculate 3*2-(-1)=7
Example: Numbers 3,2,1 and target 7, calculate 3*2+=7
The physical versions of the game have 24 tiles
| 1 to 10 | 2 copies |
| 25, 50, 75 and 100 | 1 copy |
Several mathematical problems are inspired by the account is good:
The sequence 1, 2, 4, 10, 29, 76, 284, 1413, 7187, 38103, 231051, 1765186, 10539427 here is defined by a(1)=1 and a(n) the smallest positive integer that cannot be obtained from the integers 0 to n-1, using each number at most once and the operators +, -, ×, and /.
Example: For n=4, the authorized numbers are 0, 1, 2 and 3 and it is possible to find 4=1+3, 5=2+3, 6=2*3, 7=2*3+1, 8 =(1+3)*2, 9=(1+2)*3, but impossible to find 10, so a(4) = 10.
The sequence 1, 2, 4, 11, 34, 152, 1007, 7335, 85761, 812767 here is defined by a(1)=1 and a(n) the smallest positive integer which cannot be obtained from the integers a(i) with i < n-1.
Example: For n=4, the authoritative numbers are 1,2,4, it is possible to find 5=1+4, 6=2+4, 7=1+2+4, 8=2*4, 9=2 *4+1, 10=(1+4)*2, but impossible to find 11, so a(4) = 11.
The sequence 1, 2, 4, 11, 34, 152, 1143, 8285, 98863, 1211572 here is similar but allows non-integer intermediate results.
Drawing 1, 2, 4, 11, 34, 152 allows players to find all solutions from 1 to 1006.
dCode retains ownership of the "Countdown Numbers Game" source code. Any algorithm for the "Countdown Numbers Game" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Countdown Numbers Game" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Countdown Numbers Game" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Countdown Numbers Game" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Countdown Numbers Game on dCode.fr [online website], retrieved on 2025-12-22,