a1+a2+a3+....+an = 271
we need to maximise a1*a2*a3*....*an
from AM-GM
(271)/n ≥ (product)1/n
=> product ≤ (271/n)n
consider f(x) = (271/x)x
lnf(x) = x*ln(271) - x*lnx
f'(x)/f(x) = ln(271) - 1 - lnx = 0
=> lnx = ln(271/e)
=> x = 271/e = 99.69
so 271 = e*(271/e)
each part is 271/e