Guest User

Mcnuggets

a guest
Dec 20th, 2011
51
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def packages(set1,set2,set3):
  2. nums =[0]*151
  3. for a in range (150//set1+1):
  4. for b in range ((150-a*set1)//set2+1):
  5. for c in range ((150-a*set1-b*set2)//set3+1):
  6. nums[a*set1+b*set2+c*set3] = 1
  7. notPossible = [i for i in range (151) if nums[i] != 1]
  8. return notPossible[-1]
RAW Paste Data