Problem statement
Given a positive integer $ L $. Find the maximum volume that can be a rectangular parallelepiped whose total length, width, and height (which do not have to be integers).
Constraints
If the length, width, and height are set to $ a, b, and c $, respectively, the problem is to find the maximum value using the additive geometric mean of the three variables.
L = int(input())
a = L / 3
print(a ** 3)
When $ a, b, c \ geq0 $, $ a + b + c \ geq3 \ sqrt [3] {abc} $ holds, and when $ a = b = c $, the equal sign holds. When this inequality is transformed, it becomes $ (\ frac {a + b + c} {3}) ^ 3 \ geq abc $, and $ abc $ becomes the maximum when the equal sign holds.
Recommended Posts