Problem 45438. Successive zeros (harder)

The problem is from Problem 45436,

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

86.96% Correct | 13.04% Incorrect
Last Solution submitted on May 04, 2020

Problem Comments