You are viewing a single comment's thread. Return to all comments →
int count = 0, p_r_p_c = 1; //p_r_p_c = page required per chapter for(int i = 0; i< arr.size();i++){ int n = 1; while(n <= arr[i]){ if(n == p_r_p_c) count++; if(n%k == 0 && n != arr[i]) p_r_p_c++; n++; } p_r_p_c++; } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Lisa's Workbook
You are viewing a single comment's thread. Return to all comments →