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

Baba raoulbia at gmail.com
Wed Aug 18 19:52:35 CEST 2010

Hi Chas

Thanks for that and i agree on your last remark :)

re the number of required consecutive passes required:

The number of required consecutive passes is equal to the smallest
number because after that you can get any amount of nuggets by just
adding the smallest nugget pack to some other number.

This is only true if gcd(a,b,c)=1.

Thanks to all for the help in getting to the bottom of the exercise. I
have truly enjoyed this and most importantly i have learned some new
things. Hadn't really done any mathematics in a long time and only
starting programming so this was good to get up to speed.

kind regards to everyone!

More information about the Python-list mailing list