Help for this page

Select Code to Download


  1. or download this
    $output[int($_/3)] += $arr[$_] for 0..@arr-1;
    
  2. or download this
    my $k = @arr / 3;
    for (0..$k) {
        $output[$_] += $arr[3*$_] + $arr[3*$_+1] + $arr[3*$_ +2];
    }
    
  3. or download this
    my $k = @arr / 3;
    my $b = 0;
    ...
        $output[$_] = $arr[$b] + $arr[$b+1] + $arr[$b +2];
        $b += 3;
    }