返回题库

数字乘积为 96 的最小数与最大数之差

Digit Multiplication II

专题
Brainteaser / 脑筋急转弯
难度
L4

题目详情

设集合 AA 为所有“各位数字乘积等于 96”的整数(十进制)。记 xxyy 分别为 AA 中的最小元素与最大元素。

已知不允许任何一位为 1(因此 AA 有限)。问:yxy-x 等于多少?

Let AA be the set of all integers whose digits multiply to 9696. Furthermore, let xx and yy be the minimal and maximal elements of AA, respectively. What is yxy - x? Note that no digit can be 1, so that AA is finite.

解析

分解:96=332=32596=3\cdot 32=3\cdot 2^5

  • 为得到最大数,应尽量把因子拆成尽可能多的较小数字,并把大数字放在高位。用数字 33 与五个 22 得到最大值 322222322222
  • 为得到最小数,应尽量“合并”因子,使位数更少且数更小:23=82^3=823=62\cdot 3=6,于是把四个 2 和一个 3 合并成 8 与 6,剩下一个 2,得到最小值 268268

因此

yx=322222268=321954.y-x=322222-268=321954.

Original Explanation

The prime factorization of 9696 is 332=3253 \cdot 32 = 3 \cdot 2^5. Therefore, we need to have 55 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 322222322222. For the smallest value, note that 23=82^3 = 8 and 23=62 \cdot 3 = 6. Therefore, we condense down 4 of the twos and the three into an 88 and 66. We can't condense more, as otherwise those digits will be larger than 1010, so the smallest value that can be made from 88, 22, and 66 is clearly 268268. Thus, our answer is 322222268=321954322222 - 268 = 321954.