/* Enigma puzzle 1000 in Picat. Problem from ECLiPSe example enigma1000.pl: """ Enigma 1000 by Richard England (New Scientist 10/10/98) ENIGMA / M = TIMES Each letter stands for a different digit. No number starts with zero. """ This Picat model was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import cp. main => go. go ?=> Letters = [E,N,I,G,M,A,T,S], Letters :: 0..9, all_different(Letters), 100000*E + 10000*N + 1000*I + 100*G + 10*M + A #= M * (10000*T + 1000*I + 100*M + 10*E + S), E #> 0, M #> 0, T #> 0, solve($[ff,split],Letters), println(Letters), fail, nl. go => true.