You are viewing a single comment's thread. Return to all comments →
c++ my solution
int birthday(vector<int> s, int d, int m) { int aciertos = 0; for(int i = 0; i < s.size();i++){ int sum = 0; for(int j=0; j < m; j++){ sum = sum +s[i+j]; } if(sum == d)aciertos++; } return aciertos; }
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 →
c++ my solution