Company: Razorpay_4sep
Difficulty: medium
Special Numbers Problem Description A special number is a number in which: Prime valued indices consist of prime digits. Non-prime valued indices consist of non-prime digits. By indices in a number, we refer to the position of a digit from the left of the number (1-indexed). For example, 534 consists of 5 at index 1 , 3 at index 2 , and 4 at index 3 . Note: Prime digits are: 2, 3, 5, 7. Non-prime digits are: 0, 1, 4, 6, 8, 9. Prime indices are prime numbers: 2, 3, 5, 7, etc. Non-prime indices are non-prime numbers: 1, 4, 6, 8, etc. You are given three numbers named as N , M , and K . Your task is to find out how many N-digit special numbers can be formed that leave a remainder K when divided by M . Since the answer can be very large, print it by taking modulo 1000000007 . Function Description Complete the specialNumber function provided in the editor. The function takes the following 3 parameters and returns the required answer: N : Represents the count of digits allowed in special num