We call decimal number a monotone if:
Write a program which takes positive number n on input and returns number of decimal numbers of length n that are strict monotone. Number can’t start with 0.
Input : 2 Output : 36 Numbers are 12, 13, ... 19, 23 24, ... 29, .... 89. Input : 3 Output : 84
Explanations of this problem follows the same rules as applied on:
Number of decimal numbers of length k, that are monotone
The only difference is that now we cannot take duplicates, so previously computed values are the one on the left and left top diagonal.
- Counting numbers of n digits that are monotone
- Number of digits before the decimal point in the division of two numbers
- Find length of period in decimal value of 1/n
- Count number of digits after decimal on dividing a number
- 10's Complement of a decimal number
- 9's complement of a decimal number
- Check if the given decimal number has 0 and 1 digits only
- Exponential notation of a decimal number
- Check if Decimal representation of an Octal number is divisible by 7
- Converting Decimal Number lying between 1 to 3999 to Roman Numerals
- Sum of all odd length palindromic numbers within the range [L, R]
- Find a range of composite numbers of given length
- Print all increasing sequences of length k from first n natural numbers
- Find the count of numbers that can be formed using digits 3, 4 only and having length at max N.
- Given a number N in decimal base, find number of its digits in any base (base b)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : manishshaw1