Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ def k_works(k):
hours = 0

for p in piles:
hours += ceil(p / k)
# hours += ceil(p / k) ## may not work as expected without explicitly importing math.ceil
hours += ceil(p / k - 1) // k

return hours <= h

Expand Down