3-digit numbers with a product of own digits

Find the sum of all 3-digit numbers a b c \overline{abc} such that

a b c = a b c ( a + b + c ) . \overline{abc}=abc(a+b+c).

If you think there are no such numbers, submit 1 -1 as the answer.


The answer is 279.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Kyle T
May 7, 2019

using the code below, we can find the two numbers that satisfy this condition are 135 and 144, the sum of which is our answer, 279.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
$numbers = array();
for($i=100;$i<=999;$i++){
    $arr = str_split($i);
    if(array_product($arr)*array_sum($arr)==$i){
        $numbers[] = $i;
    }
}
echo (count($numbers)) ? array_sum($numbers) : '-1';
?>

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...