Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use List::Util qw(max);
- my @palindromes;
- for my $i (100 .. 999) {
- for my $j (100 .. 999) {
- my $product = $i * $j;
- if (reverse($product) eq $product) {
- push @palindromes, $product;
- }
- }
- }
- print max(@palindromes), "\n";
Advertisement
Add Comment
Please, Sign In to add comment