I really like this problem, but I'm confused by one of the test cases. It asserts that num_count(2,2) is 90. If I'm reading that correctly, that means the number of two digit numbers without two successive zeros should be 90. But I can only think of one two digit number with two successive zeros: 00. Am I misinterpreting something?
num_count(2,2) == [10 : 99]
so total 2 digit numbers 'without' 2 successive zeros = 90 [since from 10 to 99, none of them contains 2 successive zeros].
now, '00' is not considered as a two digit number. similarly '023' is not considered as a 3 digit number.
I've considered the integer sequence here.
Find relatively common elements in matrix rows
Renaming a field in a structure array
First non-zero element in each column
Stuff the Board
Get the length of a given vector
Abelian Sandpile - 01
Check Digit - 02
The End of the World
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office