#Pyth, 9 bytes
osjN2U^2Q
o
rder by the s
um of the base 2 representation (jN2
) over the range (U
) of 2 ^ Q
.
(Q
= eval(input())
).
#Pyth, 9 bytes
osjN2U^2Q
o
rder by the s
um of the base 2 representation (jN2
) over the range (U
) of 2 ^ Q
.
(Q
= eval(input())
).