develooper Front page | perl.golf | Postings from July 2002

Re: It's so simple ! It can't be that hard !

Thread Previous | Thread Next
From:
Markus Laire
Date:
July 31, 2002 16:33
Subject:
Re: It's so simple ! It can't be that hard !
Message ID:
3D489DD0.31941.3D979FD@localhost
My first post here, and also first try in golfing so this isn't too good ;)

$/=pop;$,=pop;for$i(0..15){
($_=sprintf'%04b',$i)=~s/(.)(.)(.)(.)/$1$2\n$3$4\n/;
y/01/.O/,print,last,if$/eq$1+$2.($3+$4)&&$,eq$1+$3.($2+$4)}

btw, how is the score calculated?

-- 
Markus Laire 'malaire' <markus.laire@nic.fi>



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About