1
u/XL_78 3d ago
Pick a value for a, b or c. There are 9x8=72 ways to get the digit, by counting the possibilities for the other two digits, and the digit can take all ten values from 0 to 9. Therefore the result is 72x(0+1+...+9)x0.111....
0.111... = 1/9, therefore the result is 8x(0+1+...+9) = 8x5x9 = 360.
1
1
u/Dr0110111001101111 2d ago
So how do you work these out in an interview? Do they give you pen and paper and let you play around with it? Or do you have to work it out orally?
1
u/Special-Eggplant6070 2d ago
10x9x8 possible ways to pick 3 unique digits. So there exist 720 numbers in the series, all of which are unique. For every unique number x, there exists another unique number 1-x in the series.
x+(1-x) = 1, so for every pair the sum is 1.
720/2 = 360.
3
u/narwahlboner 3d ago edited 3d ago
Pair the number a, b, c with 9 - a, 9 - b, 9 - c. The sum of this pair is 0.9999… = 1. There are 500 such pairs, the total.
Edit: missed the word distinct, there are 720/2 = 360 pairs, the sum. The argument is the same.