numof 1 bits in 0 to 255 by Patashu

class A{public static void main(String[]a){for(int i=-1,j,k;i++<255;System.out.print(k))for(j=i,k=0;j>0;j/=2)k+=j&1;;}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page