Absolute Differencebeginner series
And yet three more integers. These are Tom, Dick and Harry, and they satisfy some quite tricky conditions. Because the solver is actually not very good at arithmetic (it’s really designed to do logic, which is rather different) this is about as complicated as the arithmetic gets – for the rest of the puzzles we shall not use integers very much.
The puzzle uses the “absolute difference” function, defined as the difference between the larger of two numbers and the smaller. This is supplied as a built-in expression “DIF” which the solver understands. You may write either “DIF (x,y)” or “x DIF y” to represent |x-y|.
- Tom, Dick and Harry are natural numbers (i.e. non-negative integers).
- Their sum is 25.
- The absolute difference between Tom and Dick is one less than that between Dick and Harry.
- The absolute difference between Tom and Harry is equal to Dick plus or minus 1.
- Tom is greater than the absolute difference between Dick and Harry.
- Dick is greater than 6.
Solver
Auto Parser Results
No errors found.