Help for this page

Select Code to Download


  1. or download this
    my @l= (0..25);
    sub c{0==$_[0]%3}
    sub S{my($c,$l,@r)=@_;@$l=grep&$c($_)?!push@r,$_:1,@$l;@r}
    ...
    Output:
    @r=(0 3 6 9 12 15 18 21 24)
    @l=(1 2 4 5 7 8 10 11 13 14 16 17 19 20 22 23 25)