You are viewing a single comment's thread. Return to all comments →
It works. Thanks!
func birthday(s []int32, d int32, m int32) int32 { var i, answer, temp int32
for i = 0; i <= int32(len(s)) - m; i++ { for j := i; j < i + m; j++ { temp += s[j] } if temp == d { answer++ } temp = 0 } return answer
}
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 →
It works. Thanks!
func birthday(s []int32, d int32, m int32) int32 { var i, answer, temp int32
}