summaryrefslogtreecommitdiff
path: root/perl/p4.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl/p4.pl')
-rwxr-xr-xperl/p4.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl/p4.pl b/perl/p4.pl
index 9982fa5..3180cf7 100755
--- a/perl/p4.pl
+++ b/perl/p4.pl
@@ -10,9 +10,9 @@ use List::Util qw(max);
# Imperative
my $resp;
for my $x (100 .. 999) {
- for my $y ($x .. 999) {
- my $cand = $x*$y;
- $resp = max($resp, $cand) if $cand eq reverse($cand);
- }
+ for my $y ($x .. 999) {
+ my $cand = $x*$y;
+ $resp = max($resp, $cand) if $cand eq reverse($cand);
+ }
}
print "$resp\n";