Consider the digits: 1234567890. First remove one digit, then swap two adjacent digits and
then insert some number of plus signs between the digits. There is a way to do this so that
the answer to the resulting arithmetic expression is 2004!
Hints:
You should define the digits as a list in your code, i.e. put the fact:
digits([1,2,3,4,5,6,7,8,9,0]) in your program.
How to do? Where to start?
then insert some number of plus signs between the digits. There is a way to do this so that
the answer to the resulting arithmetic expression is 2004!
Hints:
You should define the digits as a list in your code, i.e. put the fact:
digits([1,2,3,4,5,6,7,8,9,0]) in your program.
How to do? Where to start?