Sum of Continuous Subarray

You are given a list of non-negative numbers and an integer K as arguments. Return true if the array contains a continuous subarray that sums up to a multiple of K, false if not.

Requirements

  • Must return either true or false

Example #1

solve([20, 10, 2, 16, 17], 6)
> true

The subarray \[10,2] will sum up to 12 (10+2=12), which is a multiple of 6, so we return true

Example #2

solve([14, 17, 18], 6)
> false

14+17, 14+17+18 and 17+18 do not sum up to a multiple of 6, so we return false.