Company: Myntra
Difficulty: medium
Check Subarray Sum Bob gave Alice n bundles of rupees represented by array nums[] where nums[i] represents that bundle. Bob wants to distribute some rupees equally to k persons so that each person must receive an equal number of rupees and no amount left after the distribution. Bob is busy with work so he asked Alice to do this task. The task is to take any one adjacent group of bundles and from them, Alice can distribute the amount to k persons equally with no amount left after distribution. Note: Alice cannot distribute the amount from the single bundle. At least 2 bundles are required for the distribution. Input Format The first line contains two integers n and k. The second line contains the n elements of the Array Output Format Print a single boolean variable result – whether Alice can distribute the amount to k person equally or not. Constraints 1 ≤ n ≤ 100000 0 ≤ nums[i] ≤ 2000 1 ≤ k ≤ 300 Sample Test Cases Sample Testcase 1 Input: 5 6 2 2 2 8 4 Output: 1 Explanation: Alice can