You are given three integers n, w, and maxWeight.
A cargo ship has a square deck of size n $ imes$ n, where each cell can hold at most w, and the ship can carry a total weight of at most maxWeight.
Return the maximum number of containers that can be loaded onto the ship.
Constraints:
n
w
maxWeight
You are given three integers n, w, and maxWeight.
A cargo ship has a square deck of size n $ imes$ n, where each cell can hold at most w, and the ship can carry a total weight of at most maxWeight.
Return the maximum number of containers that can be loaded onto the ship.
Constraints:
n
w
maxWeight