Skip to content

Instantly share code, notes, and snippets.

@ichirin2501
Created August 20, 2012 04:45
Show Gist options
  • Save ichirin2501/3401032 to your computer and use it in GitHub Desktop.
Save ichirin2501/3401032 to your computer and use it in GitHub Desktop.
Project Euler 29
#!/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