.
If the middle digit is 9, then there are 8 possibilities for the most-left digit (from 1 to 8 inclusive),
and 9 possibilities for the most-right digit (from 0 to 8 inclusive).
So, there are 8*9 = 72 such mountain numbers for the middle digit 9.
For the middle digit 8, there are 7*8 = 56 mountain numbers, following the same logic.
For the middle digit 7, there are 6*7 = 42 mountain numbers.
For the middle digit 6, there are 5*6 = 30 mountain numbers.
For the middle digit 5, there are 4*5 = 20 mountain numbers.
For the middle digit 4, there are 3*4 = 12 mountain numbers.
For the middle digit 3, there are 2*3 = 6 mountain numbers.
For the middle digit 2, there are 1*2 = 2 mountain numbers.
For the middle digit 1, there are 0*1 = 0 mountain numbers.
For the middle digit 0, there are 0 mountain numbers.
The last step is to calculate the sum 72 + 56 + 42 + 30 + 20 + 12 + 6 + 2 to get the answer.
Happy calculations (!)