Project Euler 190: Maximizing a weighted product
Project Euler 190 Problem Description
Project Euler 190: Let Sm = (x1, x2, … , xm) be the m-tuple of positive real numbers with x1 + x2 + … + xm = m for which Pm = x1 * x22 * … * xmm is maximised.
For example, it can be verified that [P10] = 4112 ([ ] is the integer part function).
Find Σ[Pm] for 2 ≤ m ≤ 15.
Project Euler 190 SolutionRuns < 0.001 seconds in Python 2.7.
Use this link to get the Project Euler 190 Solution Python 2.7 source.
AnswerSlowly swipe from either end beginning with the white vertical bar to get an idea of the starting or ending digits. For less drama, just double click the answer area. The distance between the two bars will give you an idea of the magnitude. Touch devices can tap and hold the center of the box between the two bars and choose define to reveal the answer.
No afterthoughts yet.