Company: HiLabs_SDE
Difficulty: medium
The coin problem Problem Description Given N coins whose amount ranges from 0 to N-1 respectively. Your friend wants to take K coins out of your coins. You can only give the coins if the set of K coins is useful. A set of coins is useful if the sum of the coins is divisible by a given integer M. Find the number of ways in which your friend can get K coins. Since the answer can be large, print the answer modulo 10 9 + 7. Function description Complete the solve function provided in the editor. This function takes the following 3 parameters and returns the answer: n . Represents the number of coins k . Represents the amount of coin your friend wants m . Represents the integer value Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code. The first line contains 3 space-separated integers N, K, and M. Output format Print the answer. Examples Example 1: Input: 4 2 2 Output: 2 Ex