You are viewing a single comment's thread. Return to all comments →
var page = 1; var result = 0; for (int i = 0; i < n; i++) { var index = 1; while (index <= arr[i]) { if (page == index) result++; if (index % k == 0 && index != arr[i]) page++; index++; } page++; } return result;
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 →