Easiest solution
Complexity
Time complexity:

Code

# Complexity
- Time complexity:
![image.png](https://assets.leetcode.com/users/images/5a1c6539-ed95-4896-b081-1ab0a6e37732_1743195316.5661032.png)



# Code
```java []
class Solution {
    public int maxContainers(int n, int w, int maxWeight) {
        return Math.min(n*n,maxWeight/w);
    }
}
```
['Math', 'C++', 'Java', 'Python3']