• + 0 comments
    def birthday(s, d, m):
    # Write your code here
    count = 0
    
    
    if isinstance(s, list):
        if m == 0:
            return "0"
        for i in range(len(s) - m + 1):
            if sum(s[i:i + m]) == d:
                count += 1
    
        elif isinstance(s, int):
        if m == 1 and s == d:
            count = 1
    
    return f"{count}"
    elif isinstance(s, int):
        if m == 1 and s == d:
            count = 1
    
    return f"{count}"