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