Created
January 22, 2017 00:00
-
-
Save zoffixznet/72693f839766183ddf82a0e0dafecb45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $sum = 0; | |
for (1..2015) -> $term { | |
$sum += $term; | |
my $sqr = sqrt $sum; | |
my $fsqr = floor sqrt $sum ; | |
my $factors; | |
$sum %% $_ and $factors +=2 for 1..$fsqr; | |
$factors-- if $fsqr == $sqr; | |
} | |
say now - INIT now; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment