You are viewing a single comment's thread. Return to all comments →
Ruby version:
def solve(squares, d, m) squares.each_cons(m).map(&:sum).select { |s| s == d }.count end
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 →
Ruby version: