Easiest and simplest Solution
Complexity

Time complexity:
O(1)


Space complexity:
O(1)

Code

# Complexity
- Time complexity:
O(1)

- Space complexity:
O(1)

# Code
```cpp []
class Solution {
public:
    int maxContainers(int n, int w, int maxWeight) {
        if(maxWeight-n*n*w >= 0){
            return n*n;
        }else{
            return maxWeight/w;
        }
    }
};
```
['C++']