Skip to content

Instantly share code, notes, and snippets.

@kaathewise
Last active January 7, 2024 10:25
Show Gist options
  • Save kaathewise/3d08c8191508e572b306ef8048f8f067 to your computer and use it in GitHub Desktop.
Save kaathewise/3d08c8191508e572b306ef8048f8f067 to your computer and use it in GitHub Desktop.
digits = [0b111111000, 0b011000100, 0b110100001, 0b100000111, 0b011001010, 0b101101010, 0b001110110, 0b100010100, 0b111111010, 0b110001011]
print(sum(1 for m in range(512) if m.bit_count() == 4 and len({x & m for x in digits}) == 10)) # 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment