Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This kata is a duplicate of https://www.codewars.com/kata/60df63c6ce1e7b0023d4af5c
The kata has performance requirements, so it should specify input range.
I'm seeing a bug in the random tests, here's an example:
With these inputs:
l = [3, -1, 1, -8, -6, 10, 3, 0, -7, 0]
, ands = 3
.I find these four solutions all summing to
3
:sum(l[0:1]) => sum([3]) => 3
sum(l[0:3]) => sum([3, -1, 1]) => 3
sum(l[6:7]) => sum([3]) => 3
sum(l[6:8]) => sum([3, 0]) => 3
The error message says I should be finding 3 not 4 solutions, are solutions that end in zero excluded from the count?