advanced code snippet search
cmm7825 on 05/20/10
05/20/10 04:21pm
#!/usr/bin/perluse strict;use warnings;use POSIX qw(floor); my $n = 0;my $count = 0;my $i = 1; while($count<500){ $count = 2; $n += $i; $i++; foreach (2..floor($n**0.5)){ $count+=2 if $n % $_ == 0; }} print $n;
Report this snippet Tweet
Comment:
You need to login to post a comment.