200+ followers (hard version)

Calvin thinks of a 5-digit number. He tells you the product of the digits is n n .

Knowing only that, there are exactly 200 different numbers which Calvin could have thought of.

Find the sum of all possible values of n n .


Try the easier version at here .


The answer is 25176.

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
Mar 7, 2019

<?php
$p = array();
for($i=10000;$i<100000;$i++){
$product = array_product(str_split($i));
if(isset($p[$product])){
$p[$product]++;
} else {
$p[$product] = 1;
}
}
foreach($p as $key=>$val){
if($val!=200){
unset($p[$key]);
}
}
$v = array_keys($p);
echo array_sum($v); //25176
?>


What's this??

Alapan Das - 2 years, 2 months ago

thats called php code my dude

Kyle T - 2 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...