Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import nimconstraint, sequtils, math
- let catalanConjecture = newProblem[int64]()
- catalanConjecture.define:
- X in toSeq(2'i64..15'i64)
- Y in toSeq(2'i64..15'i64)
- catalanConjecture.constrain:
- (X ^ Y) == (Y ^ X) - 1
- echo catalanConjecture.search # X = 2, Y = 3
- catalanConjecture.constrain:
- X > 2
- Y > 3
- echo catalanConjecture.search # No Solutions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement