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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Counting numbers of n digits that are monotone
- Convert Decimal To Hexa-Decimal including negative numbers
- Find length of period in decimal value of 1/n
- Number of digits before the decimal point in the division of two numbers
- Count number of digits after decimal on dividing a number
- Given a number N in decimal base, find number of its digits in any base (base b)
- Program to Convert BCD number into Decimal number
- BCD addition of given Decimal numbers
- Number of ways to cut a stick of length N into in even length at most K units long pieces
- Minimize number of cuts required to break N length stick into N unit length sticks
- Converting Decimal Number lying between 1 to 3999 to Roman Numerals
- 9's complement of a decimal number
- Exponential notation of a decimal number
- 10's Complement of a decimal number
- Check if Decimal representation of an Octal number is divisible by 7
- Check if the given decimal number has 0 and 1 digits only
- Find the Nth digit from right in base B of the given number in Decimal base
- Given a number N in decimal base, find the sum of digits in any base B
- Convert a given Decimal number to its BCD representation
- Program to convert Hexa-Decimal Number to its equivalent BCD
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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