3 September 2026
Paint Plan
Medium
Lists
Numbers
Find how many paint tins are needed to cover all the rooms.
You are given the wall area of each room and the area that one paint tin can cover. First, add together the areas of all the rooms. Return the number of whole paint tins needed to cover that total. If there is any area left after filling complete tins, you still need one more tin. Return 0 when there are no rooms.
Constraints
room_areas contains at most 100 positive whole numberscoverage_per_tin is a positive whole numberOne tin covers the same area in every room
Function signature
def paint_tins(room_areas, coverage_per_tin):