You are viewing a single comment's thread. Return to all comments →
javascript
let currentPage = 1; let specialProblems = 0; for (let i = 0; i < arr.length; i++) { let countProblemPerPage = 0; for (let j = 1; j <= arr[i]; j++) { ++countProblemPerPage if (countProblemPerPage > k) { countProblemPerPage = 1; currentPage++ } if (j === currentPage) { specialProblems++ } } currentPage++ } return specialProblems;
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 →
javascript