数字乘积为 96 的最小数与最大数之差
Digit Multiplication II
题目详情
设集合 为所有“各位数字乘积等于 96”的整数(十进制)。记 与 分别为 中的最小元素与最大元素。
已知不允许任何一位为 1(因此 有限)。问: 等于多少?
Let be the set of all integers whose digits multiply to . Furthermore, let and be the minimal and maximal elements of , respectively. What is ? Note that no digit can be 1, so that is finite.
解析
分解:。
- 为得到最大数,应尽量把因子拆成尽可能多的较小数字,并把大数字放在高位。用数字 与五个 得到最大值 。
- 为得到最小数,应尽量“合并”因子,使位数更少且数更小:、,于是把四个 2 和一个 3 合并成 8 与 6,剩下一个 2,得到最小值 。
因此
Original Explanation
The prime factorization of is . Therefore, we need to have twos and a three in our number accounted for. For the largest possible value, we should arrange the values in descending order left to right, as this would give the largest weight to digits of largest value. Therefore, our largest value is . For the smallest value, note that and . Therefore, we condense down 4 of the twos and the three into an and . We can't condense more, as otherwise those digits will be larger than , so the smallest value that can be made from , , and is clearly . Thus, our answer is .