Problem 45438. Successive zeros (harder)
The problem is from Problem 45436, https://www.mathworks.com/matlabcentral/cody/problems/45436-successive-zeros
Suppose n is the number of digits a number contains.
12032 - is a valid n=5 digit number. But 10023 - is defined as invalid -- because it contains two successive zeros.
Calculate the number of n-digit numbers that do not contain successive d-number of zeros.
The difference is adding more big integers to the test. Your algorithm needs to be much faster!
Solution Stats
Problem Comments
-
1 Comment
As with the other problem of this kind, the problem description should be "Calculate the number of n-digit numbers that do not contain successive d-number of zeros at least."
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
Remove all the words that end with "ain"
2626 Solvers
-
How to find the position of an element in a vector without using the find function
2806 Solvers
-
Convert a numerical matrix into a cell array of strings
2354 Solvers
-
Choose the best fitting dominoes
242 Solvers
-
Highly divisible triangular number (inspired by Project Euler 12)
162 Solvers
More from this Author17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!