"Compte est bon" (The Countdown Numbers Game) is a mathematical puzzle game where players use given numbers and basic arithmetic operations to reach a target number.
- Play Mode: Interactively play the game and try to reach the target number using the given numbers
- Solver Mode: Automatically find all possible solutions for a given set of numbers and target
- You are given a set of numbers (choosen in 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,25,50,75,100) and a target number
- Use the four basic operations (+, -, ×, ÷) to combine the numbers and reach the target
- Each number can be used at most once
- The goal is to reach the target number exactly (but sometimes its simply not possible to do so)
from chiffres import Chiffres
mySolver = Chiffres([2, 4, 5, 25])
mySolver.solve()
mySolver.printDictionary("results.txt")
solutions = mySolver.play(545)
if(len(solutions) > 0):
solutions.sort(key=Solution.qualite)
print(solutions[0])
else:
print("No solution found")- Python 3.14
- uv (install the environment)