in reply to Golf: Selection from sets (Choose)
It's warnings and strict compliant, and returns all the right answers.sub c{ my($c,$d)=@_;my%n=map{$_=>1}1..$c;delete$n{$_}for 1..($c-$d); eval join'/',map"($_)",(join'*',keys%n),(join'*',1..$d) }
nuf evah,
jynx
|
|---|