Population count: Difference between revisions

m
m (→‎{{header|11l}}: popcount())
Line 39:
{{trans|Python}}
 
<syntaxhighlight lang="11l">Fprint((0.<30).map(i -> (Int64(3) ^ i).popcount(n)))
R bin(n).count(‘1’)
 
print((0.<30).map(i -> popcount(Int64(3) ^ i)))
 
[Int] evil, odious
V i = 0
L evil.len < 30 | odious.len < 30
V p = i.popcount(i)
I (p % 2) != 0
odious.append(i)
1,480

edits