The question is, given an equation of the form:
ax+by+cz+... = N
where all quantities are integers, what is the maximal value of N which is not a solution?
So, in terms of the original problem, if I sell zombie fingers in packs of 6, 9, and 20, it's clear that you can't buy exactly 19 fingers without bribing me to slip an extra into one pack. It's also clear that you can easily buy 52 zombie fingers, by buying two packs of 20 and two of 6. What is the largest number of zombie fingers that you can't buy as an exact quantity?
The general problem, and the challenge, is to write the most efficient program to determine the maximal non-solution N for any arbitrary list of coefficients, where the list can be of any length.
* Any language will be accepted, but Python is prefered
* Python 2 or 3 is fine for the Python entries
* Anyone submitting a solution please use SPOILER tags
* I'd ask for Python experts to hold off a bit before posting a solution, to give other people a shot - please do show interest though, and discussion is always welcome.
* Any questions, just use this forum. No PMs please, everyone should benefit!
* You'll be pleased to hear, the Simown constraint is not in effect in this challenge.
And finally, good luck! Happy challenging!
This post has been edited by Simown: 31 October 2012 - 02:39 PM