Help for this page

Select Code to Download


  1. or download this
    @a = qw/1 1 0 3 8 9 5 2 0 12 2 1/;
    $m = 5;
    ...
    }
    
    print "@b\n";
    
  2. or download this
    1 1 0 3 8 9 5 2 0 12 2 1
    5 8 9 7 15
    
  3. or download this
    @a = qw/1 13 0 3 8 9 5 2 2 0 1 0 2 0 2 1 13 1/;
    $m = 5;
    ...
    
    $s < $m ? $b[$#b] += $s : push @b, $s;
    print "@b\n";