Skip to content

Instantly share code, notes, and snippets.

@Hurricane996
Last active July 30, 2020 03:21
Show Gist options
  • Save Hurricane996/29dce94c5759b2b214b8a566fedc2ec6 to your computer and use it in GitHub Desktop.
Save Hurricane996/29dce94c5759b2b214b8a566fedc2ec6 to your computer and use it in GitHub Desktop.
from itertools import *
print([len(list(filterfalse(lambda x: any(map(lambda y: y in x, (1,5))) or any(map(lambda y: x.count(y) >=3, (2,3,4,6))) or x == [1,2,3,4,5,6] or x in map(lambda x: sorted(x*2),combinations([2,3,4,6],3)),map(lambda x: sorted(x),product(range(1,7),repeat=n)))))/6**n for n in range(1,7)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment