Develop an algorithm to match part numbers based upon 2 variables.
I have been struggling to build a algorithm to solve the following issue:
</b>I have a building</b>
The building can have any number of rooms (<100)
The building has lighting controller(s)(Arbitrary)
Each Lighting controller can control up to four rooms with a unique part number based on numbers of rooms.
1R controls 1 Room
2R controls 2 Rooms
3R controls 3 Rooms
4R controls 4 Rooms
If I know the number of Rooms and Lighting Controllers, How do I determine quantity of each controller