Raul,

Looking at the original source of the problem, the first question has only
9 solutions, not 10. So your solution is correct.
Here's the original problem statement and solution:
https://xianblog.wordpress.com/2019/06/18/le-monde-puzzle-1104/
Here's my version of the solution

pal=.]#~(=|.&.":&>)

coins=:pal}.i.1e3

(}.i.1e3)-.coins,,+/~1e3(>#])coins

21 32 43 54 65 76 87 98 201


So only 9 answers.

Skip Cave


On Wed, Jun 19, 2019 at 2:56 PM Raul Miller <[email protected]> wrote:

> I came back to think about this and I noticed a mistake:
>
> On Wed, Jun 19, 2019 at 10:12 AM Raul Miller <[email protected]>
> wrote:
> > I don't know what the tenth value would be. (If I remove the "1" coin,
> > I get 18 values that can't be paid with three coins.)
>
> That should have been:
>
> ... that can't be paid with less than three coins.
>
> I suppose it's possible that the tenth value might be zero? But then
> the problem statement would have been "that can't be paid with one or
> two coins" and we would have an implicit constraint against a "0"
> coin. I do have that implicit constraint in my implementation in this
> thread, but... I can't quite make sense of 0 being the tenth value we
> couldn't pay with less than three coins...
>
> Not sure if this is of any help, though.
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to