2009年1月25日星期日

prime 4th(1st in perl)

use List::MoreUtils qw(all)
@p=(2,3);
for my $i (0..149) { push @p, (grep {$k=$_; all {$k%$_} @p[0..$i+1]} ($p[$i]**2+1 .. $p[$i+1]**2-1)) }

#this script will keep 769123 in the top of @p, which is a very nice password for new year :)

没有评论: