View Single Post
Old 04-22-2009, 04:17 AM   #3
Patashu
FFR Simfile Author
Retired StaffFFR Simfile Author
 
Patashu's Avatar
 
Join Date: Apr 2006
Location: we traced the call...it's coming from inside the house
Age: 33
Posts: 8,609
Send a message via AIM to Patashu Send a message via MSN to Patashu Send a message via Yahoo to Patashu
Default Re: Codegolf: Write the shortest code you can

Ooh, thanks.

EDIT: Also, I undid an earlier attempt that added two bytes (allocating 256 to a variable, l) so now it's at 131:

Code:
class A{public static void main(String[]a){for(int i=0,j,k;i<256;i++){k=0;for(j=1;j<256;j*=2)if((i&j)>0)k++;System.out.print(k);}}}
__________________
Patashu makes Chiptunes in Famitracker:
http://soundcloud.com/patashu/8bit-progressive-metal-fading-world
http://img.photobucket.com/albums/v216/Mechadragon/smallpackbanner.png
Best non-AAAs: ERx8 v2 (14-1-0-4), Hajnal (3-0-0-0), RunnyMorning (8-0-0-4), Xeno-Flow (1-0-0-3), Blue Rose (35-2-0-20), Ketsarku (14-0-0-0), Silence (1-0-0-0), Lolo (14-1-0-1)
http://i231.photobucket.com/albums/ee301/xiaoven/solorulzsig.png

Last edited by Patashu; 04-22-2009 at 04:21 AM..
Patashu is offline   Reply With Quote