注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
听说是个startup最近开始用PIP了
在Hackerrank做了 只有一个题半个小时+15分钟buffer time
题是去年亚麻OA原题 fetch_items to display
Explanation
We sort the results by the sortColumn and order. Then using the pageSize and the pageIndex, we can figure out the number of results on the previous pages and the index of the first result of the target pageIndex page. For example, pageIndex = 1 and pageSize = 2, there are 1 * 2 = 2 results on page 0 so the index the first result of page 1 should be 2. Finally we return all the res), int(p))
for _ in range(results_length)
for n, r, p in [input().split()]
}
res = fetch_results_to_display(sort_column, sort_order, results_per_page, page_index, results)
print(' '.join(res))
求大米~ 谢谢! |