We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33124d6 commit a1dabfbCopy full SHA for a1dabfb
categories/euler/prob288-shlomif.p6
@@ -38,22 +38,22 @@ sub factorial_factor_exp($n , $f)
38
}
39
40
sub MAIN(:$verbose = False) {
41
- my @t_n;
+ my int @t_n;
42
43
my $N_LIM = 10;
44
- my $BASE = 61;
+ my int $BASE = 61;
45
my $LIM = 10_000_000;
46
47
my $S_0 = 290797;
48
- my $s = $S_0;
+ my int $s = $S_0;
49
50
for (0 .. $N_LIM-1) -> $n {
51
@t_n.push($s % $BASE);
52
$s = (($s * $s) % 50515093);
53
54
55
- my $sum = 0;
56
- for ($N_LIM .. $LIM) -> $n {
+ my int $sum = 0;
+ for ($N_LIM .. $LIM) -> int $n {
57
if $n % 10_000 == 0 {
58
say "Reached $n" if $verbose;
59
0 commit comments