Guest User

nuggets

a guest
Dec 20th, 2011
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. def nuggets(n):
  3. for a in range(0,100):
  4. for b in range (0, 100):
  5. for c in range (0,100):
  6. sum = 6*a+9*b+20*c
  7. if sum ==n:
  8. print "no. of sixes",a
  9. print "no. of nines",b
  10. print "no. of twenties",c
RAW Paste Data