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

Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

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 AllSatResult Source #

Prints the only solution:

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