Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $sum = 0;
- for (1..2015) -> $term {
- $sum += $term;
- my $factors = (1..floor(sqrt($sum))).grep(-> $x { $sum % $x == 0} ).elems * 2;
- $factors-- if floor(sqrt($sum)) == sqrt($sum);
- }
- say now - INIT now;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement