Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created January 21, 2017 23:54
Show Gist options
  • Save zoffixznet/592aa345ddec4248fdfcafff9d37ec3d to your computer and use it in GitHub Desktop.
Save zoffixznet/592aa345ddec4248fdfcafff9d37ec3d to your computer and use it in GitHub Desktop.
my $sum = 0;
for (1..2015) -> $term {
$sum += $term;
my $factors = (1..floor(sqrt($sum))).elems * 2;
$factors-- if floor(sqrt($sum)) == sqrt($sum);
}
say now - INIT now;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment