Beats 100% || Math  🚀🚀🚀🚀
IntuitionThe problem involves maximizing the number of containers we can fill, given a constraint on individual container weight and the total allowable weight.
# Intuition
The problem involves maximizing the number of containers we can fill, given a constraint on individual container weight and the total allowable weight. The two limiting factors are:

Total number of containers available: 𝑛^2 (since it’s an 𝑛×𝑛 grid of containers).

Maximum number of containers we can fill based on weight capacity: 
maxWeight/𝑤 (since each container has a weight of 𝑤).
# Approach

# Complexity
- Time complexity:
O(1)
- Space complexity:
O(1)
# Code
```java []
class Solution {
    public int maxContainers(int n, int w, int maxWeight) {
        return Math.min(n*n,(maxWeight/w));
    }
}
```
```c++ []
class Solution {
public:
    int maxContainers(int n, int w, int maxWeight) {
        return min(n * n, maxWeight / w);
    }
};
```
```python []
class Solution:
    def maxContainers(self, n: int, w: int, maxWeight: int) -> int:
        return min(n * n, maxWeight // w)
```

['Math', 'Python', 'C++', 'Java']