sbv-2.9: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.

Stabilityexperimental
Maintainererkokl@gmail.com
Safe HaskellNone

Data.SBV.Examples.Puzzles.DogCatMouse

Description

Puzzle: Spend exactly 100 dollars and buy exactly 100 animals. Dogs cost 15 dollars, cats cost 1 dollar, and mice cost 25 cents each. You have to buy at least one of each. How many of each should you buy?

Synopsis

Documentation

puzzle :: IO AllSatResultSource

Prints the only solution:

>>> puzzle
Solution #1:
  dog = 3 :: SInteger
  cat = 41 :: SInteger
  mouse = 56 :: SInteger
This is the only solution.