Below is the problem statement that I have:
You get number written in base 10, you have to delete it completely by choosing two consecutive digits and deleting them. But the sum of those 2 digits should not be 17. We call the numbers which are fully deleted by repeating the above operation as "Good".
99to fully delete number.
Conclusion: 9889 is good.
NOTE: We cannot remove
89as the sum of these 2 digits is
Given a number N(even) you want to find the number of good N-digit number modulo
10^9 + 7. Include the N digit number containing leading zeros too.
Input: 2 Output: 98
Input: 4 Output: 9926
Input: 442 Output: 417551213
I have tried solving this using various codes but not able to get the result.