S denotes the sum of the digits and P denotes the product of the nonzero digits.
It is observed that for the year 2016, S = 9 and P = 12, so that:
S:P = 3:4
Determine all years from 2000 to 3000 such that:
S:P = 3:4
Every year contains a 2.
S=3, P=4 is not possible as the only possible sum is 2+1 and the product isn't 4.
S=6, P=8 allows 2+4 and also 2+2+2 (There are three permutations for each listed at the end)
S=9, P=12 allows 2+1+6 (6 permutations)
S=12, P=16 allows 2+1+1+8 (3 permutations)
and that's it
S=15, P=20 the highest sum possible with the 20 product is 2+2+5+1 < 15
Increasing P just makes things worse and eventually you reach the highest sum in the given range 2+9+9+9=29
The list:
2004, 2040, 2400,
2022, 2202, 2220,
2016, 2061, 2106, 2160, 2601, 2610,
2118, 2181, 2811.
|
Posted by Jer
on 2016-08-22 12:48:50 |