fork download
  1. #!/usr/bin/perl
  2. # your code goes here
  3.  
  4. foreach my $t (100 .. 999) {
  5. my @digits = split(//, $t);
  6. my $expr = ($digits[0] + $digits[1] + $digits[2])*($digits[0] * $digits[1] * $digits[2]);
  7. #print " $expr $t\n";
  8. if ($expr == $t) {
  9. print $t, "\n";
  10. }
  11. }
Success #stdin #stdout 0s 3608KB
stdin
Standard input is empty
stdout
135
144