Note that, to maximize the product, all of the numbers should be equal.
This follows from the Arithmetic Mean-Geometric Mean Inequality, which states that, for a set of non-negative real numbers, x1,…,xn,
with equality if, and only if, x1=…=xn.
In this case, the sum of the numbers is fixed at 271. For a given set, S, of positive numbers, therefore, the arithmetic mean equals 271n. For each such set, the geometric mean, and hence the product, of the numbers is maximized when all of the numbers are equal.
Hence we seek the maximum value of y = (271x)x, where x is a positive integer.
taking log on both sides,
Setting y' = 0, x=271e 99.7, which is clearly a maximum.
Now we need only try both 100 and 99 to confirm that 100 is the maximum value for y, when x is an integer.
Therefore the maximum product occurs when 271 = 2.71 + 2.71 + ... + 2.71. (100 equal terms.)