Lisa's Workbook

  • + 0 comments
    def workbook(n, k, arr):
        # Write your code here
        page=1
        sp=0
        for i in arr:
            for j in range(1,i+1):
                if j==page:
                    sp+=1
                if j%k==0 or j==i:
                    page+=1
        return sp