NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
I bet New Scientist publishes a correction (Score:1)
Reply to This
Re: (Score:1)
Re: (Score:1)
there is 1 solution for 7, with reverse = 2
there is 3 solutions for 9, with reverse = 6
there is 1 solution for 11, with reverse = 2
2 * 6 * 2 = 24
I used a bit more complicated code than I am about to show, but you should be able to see how I came up with the 24 solutions
Re: (Score:1)
and your code shows them.
also - you didn't take into consideration the fact that digits cannot be reused between numbers generated for various dividers.
Huh? (Score:1)
also - you didn't take into consideration the fact that digits cannot be reused between numbers generated for various dividers
I am not sure I understand.
Re: (Score:1)
I'm sure they won't publish a correction.
Note that the spec says to find a 3-digit number which satisfies the criteria, not the 3-digit number. That there are multiple such numbers, and you could've found a different one, doesn't violate the spec.
Once you've done what it says, you will have 3 3-digit numbers, plus their reverses. That's 6 integers.
Yes, other people could validly come up with a different set of 6 integers. So what? There's nothing in the spec prohibiting that! As others have noted
That's really too bad (Score:1)
Having worked on interesting puzzles like this as long as I can remember, as well as knowing many people who have the same interest - this is the type of puzzle no one likes to work on.
A simple foot note that says: While multiple preliminary solutions are possible, the max and min will always be the same.
Would have gone a long way to making others and myself happier that our solutions were correct.
By the way - you have read into the spec.
Once you've don
Re: (Score:2)
They're not usually this unclear. I think it's just a fluke, but I'd have to work through some others to be sure.