You are viewing a single comment's thread. Return to all comments →
def birthday(s, d, m): if len(s) < m: return 0 ways = 0 for i in range(len(s) - m + 1): if sum(s[i:i + m]) == d: ways += 1 return ways
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →