You are viewing a single comment's thread. Return to all comments →
int c=0; for(int i=0;i<n;i++) { int sum=0,j=i,lp=0; if((j+m)>=n && (j+m)!=1) break; else { while(lp<m) { sum+=s[j++]; lp++; if(sum==d) ++c; } } } return c;
even this is failing i don't know why when i purchased the testcases i was getting the right output.
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 →
even this is failing i don't know why when i purchased the testcases i was getting the right output.