Help for this page

Select Code to Download


  1. or download this
    use Algorithm::Combinatorics qw[ variations_with_repetition ];;
    
    ...
    
    $d = 0; $_->[0]+1 == $_->[1] or $_->[1]+1 == $_->[2] and ++$d for @c; 
    +print $d;;
    7922
    
  2. or download this
    $d = 0; $_->[0] == $_->[2]+1 and ++$d for @c; print $d;;
    8010