home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / HELP language 1.4 / Help Files / Constraints / Un+Une=Deux < prev   
Encoding:
Text File  |  1992-12-28  |  367 b   |  24 lines  |  [TEXT/Help]

  1. ;cryptarithmetics: UN+UNE=DEUX
  2. (c)
  3.  
  4. ;;; Variables
  5. (n e x r0 u r1 d)
  6.  
  7. ;;; Constraints
  8. ((=? (+ n e) (+ x (* 10 r0)))
  9.  (=? (+ r0 u n) (+ u (* 10 r1)))
  10.  (=? (+ r1 u) (+ e (* 10 d)))
  11.  (<>? n e) (<>? n x) (<>? n u)
  12.  (<>? n d) (<>? e x) (<>? e u)
  13.  (<>? e d) (<>? x u) (<>? x d)
  14.  (<>? u d)) 
  15.  
  16. ;;; Domains
  17. ((0 1 2 3)
  18.  (0 1 2 3)
  19.  (0 1 2 3)
  20.  (0 1)
  21.  (0 1 2 3)
  22.  (0 1)
  23.  (0 1 2 3))
  24.