looping through possible combinations of McNuggets packs of 6, 9 and 20

Ian Kelly ian.g.kelly at gmail.com
Mon Aug 16 19:55:01 CEST 2010


On Mon, Aug 16, 2010 at 12:43 PM, Roald de Vries <downaold at gmail.com> wrote:
>>> I'm pretty sure that if there's no common divisor for all three (or more)
>>> packages (except one), there is a largest unpurchasable quantity. That
>>> is: ∀
>>> i>1: ¬(i|a) ∨ ¬(i|b) ∨ ¬(i|c), where ¬(x|y) means "x is no divider of y"
>>
>> No.  If you take the (2,4,7) example and add another pack size of 14,
>> it does not cause quantities that were previously purchasable to
>> become unpurchasable.
>
> Then what is the common divisor of 2, 4, 7 and 14? Not 2 because ¬(2|7), not
> anything higher than 2 because that's no divisor of 2.

Ah, I misread what you meant as well.



More information about the Python-list mailing list