Subarray Division 1

  • + 0 comments

    Python solution:

    def birthday(s, d, m):
    
        return len([i for i in range(0, len(s) + 1) if sum(s[i: i + m]) == d])