/* Magic Modulo Number in Picat. From the Scampi example MagicModuloNumber.scala """ A number with an interesting property: When I divide it by 2, the remainder is 1. When I divide it by 3, the remainder is 2. When I divide it by 4, the remainder is 3. When I divide it by 5, the remainder is 4. When I divide it by 6, the remainder is 5. When I divide it by 7, the remainder is 6. When I divide it by 8, the remainder is 7. When I divide it by 9, the remainder is 8. When I divide it by 10, the remainder is 9. It's not a small number, but it's not really big, either. When I looked for a smaller number with this property I couldn't find one. Can you find it? @author Pierre Schaus pschaus@gmail.com """ 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 ?=> X :: 10..100000, foreach(I in 2..10) X mod I #= I-1 end, solve([X]), println(X), fail, nl. go => true.