Java || Beats 100% || Time Complexity : O(1)
Complexity
Time complexity: O(1)

Space complexity: O(1)
Code


# Complexity
- Time complexity: O(1)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

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