Created
July 12, 2023 16:39
-
-
Save Bejofo/e8cc8b2a2224d95f006261b4d6d3dbf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find the sum of all 64-bit ints with hamming weight 3. | |
import math;x,y=64,3;math.comb(x-1,y-1)*(2**x-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment