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

Paul Rubin no.email at nospam.invalid
Thu Aug 12 05:33:25 EDT 2010


Baba <raoulbia at gmail.com> writes:
> exercise: given that packs of McNuggets can only be bought in 6, 9 or
> 20 packs, write an exhaustive search to find the largest number of
> McNuggets that cannot be bought in exact quantity.

Is that a homework problem?  Hint: first convince yourself that a
largest number actually exists.



More information about the Python-list mailing list