Skip to content

Commit 85f27f2

Browse files
author
L. Grondin
committed
[rosalind] ASPC, slightly shorter
1 parent 301dfa9 commit 85f27f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rosalind/aspc-grondilu.pl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ sub postfix:<!> { [*] 1 .. $^n }
66

77
my $sum = my $C = C $n, $m;
88
for $m+1 .. $n -> $k {
9-
$C = $C * ($n - $k + 1) div $k;
10-
"$k: ", $sum += $C;
9+
$sum += $C = $C * ($n - $k + 1) div $k;
1110
}
1211
say $sum % 1_000_000;
1312

0 commit comments

Comments
 (0)