14
NUM: for my $i ( 10 .. 99 ) { my $sq = $i * $i; my $pent = $i * $i * $i * $i * $i; my $r = $sq . $pent; my %look; while ( $r =~ /(.)/g ) { ++$look{$1}; next NUM unless ( $look{$1} == 1 ); } print "$i: $r\n";}
14
ReplyDeleteNUM: for my $i ( 10 .. 99 ) {
ReplyDeletemy $sq = $i * $i;
my $pent = $i * $i * $i * $i * $i;
my $r = $sq . $pent;
my %look;
while ( $r =~ /(.)/g ) { ++$look{$1}; next NUM unless ( $look{$1} == 1 ); }
print "$i: $r\n";
}