Created
June 28, 2019 05:50
-
-
Save mt-caret/707702863bfebf36a0a9eaa1174efb0b 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
import "u256" | |
let popcount (n: u32): i32 = | |
loop ret = 0 for i in 0..<32 do | |
ret + u32.get_bit i n | |
let main: []u256.t = | |
map (\x -> | |
map (\y -> popcount (x ^ y) >= 4) (0..<2**10) | |
|> u256.pack | |
) (0..<2**10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment