Skip to content

Instantly share code, notes, and snippets.

@juanplopes
Created November 18, 2014 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanplopes/398e1132246f0d06a91c to your computer and use it in GitHub Desktop.
Save juanplopes/398e1132246f0d06a91c to your computer and use it in GitHub Desktop.
M = (57, 71, 87, 97, 99, 101, 103, 113, 114, 115, 128, 129, 131, 137, 147, 156, 163, 186)
T = [1] + [0]*1024
for i in xrange(len(T)):
for m in M:
if i-m >= 0:
T[i] += T[i-m]
print T[1024]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment