Counting Bouncy Numbers: Project Euler #113
Project Euler problems generally can be computed with a calculator or manually.
So, take a different approach:


For ascending numbers, choose the transitions (digits 0-9; 9 transitions).
For descending numbers, choose the transitions (initial zeros, digits 9-0; 10 transitions).
Subtract those where initial zeros are followed only by a non-empty string of a single repeated digit (0-9) (1 transition, but the last place cannot be chosen).
Subtract the case of only the initial zeros.


In the end you have to calculate:

$$\binom{100+9}{9} + \binom{100 + 10}{10} - 10 * \binom{100}{1} - 1 = \binom{109}{9} + \binom{110}{10} - 1001$$