Created
August 20, 2012 04:45
-
-
Save ichirin2501/3401032 to your computer and use it in GitHub Desktop.
Project Euler 29
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use bigint; | |
use List::MoreUtils qw/uniq/; | |
my ($a, $b) = (100, 100); | |
my @res = uniq map{ my $t = $_; map{ $t ** $_ } 2..$b } 2..$a; | |
print $#res + 1,"\n"; | |
# => 9183 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment