You are viewing a single comment's thread. Return to all comments →
def birthday(s, d, m): opt = 0 for i in range(len(s)): if(sum(s[i:i+m]) == d): opt+=1 return opt
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 →
def birthday(s, d, m): opt = 0 for i in range(len(s)): if(sum(s[i:i+m]) == d): opt+=1 return opt