N is a 12-digit base ten positive integer satisfying all the undernoted provisions:
- N contains each of the digits from 1 to 7 exactly once.
- N contains the digit 8 precisely twice.
- N contains the digit 9 exactly three times.
Determine the sum of all possible values of N.
There are 12!/(2!*3!) = 39,916,800 numbers to be added together. In each position in the sum, each of the digits 1 through 7 will occur 1/12 of the time, 8 will occur 1/6 of the numbers, and 9 will occur in 1/4 of the numbers.
1/12 * 39916800 = 3326400
1/6 * 39916800 = 6652800
1/4 * 39916800 = 9979200
1*3326400 = 3326400
2*3326400 = 6652800
3*3326400 = 9979200
4*3326400 = 13305600
5*3326400 = 16632000
6*3326400 = 19958400
7*3326400 = 23284800
8*6652800 = 53222400
9*9979200 = 89812800
--------
236174400
and that's just the value of each digit position within the sum. Each of these must be multiplied by each of the 12 position values and added together.
236174400 * 111111111111 = 26241599999973758400
which is the answer, as the decimal notation system does the multiplication and adding for us.
|
Posted by Charlie
on 2023-05-14 10:08:27 |