data/problems/183.yml
---
:id: 183
:name: Maximum product of parts
:url: https://projecteuler.net/problem=183
:content: "Let N be a positive integer and let N be split into <var>k</var> equal
parts, <var>r</var> = N/<var>k</var>, so that N = <var>r</var> + <var>r</var> +
... + <var>r</var>. \nLet P be the product of these parts, P = <var>r</var> × <var>r</var>
× ... × <var>r</var> = <var>r</var><sup><var>k</var></sup>.\n\nFor example, if 11
is split into five equal parts, 11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2, then P = 2.2<sup>5</sup>
= 51.53632.\n\nLet M(N) = P<sub>max</sub> for a given value of N.\n\nIt turns out
that the maximum for N = 11 is found by splitting eleven into four equal parts which
leads to P<sub>max</sub> = (11/4)<sup>4</sup>; that is, M(11) = 14641/256 = 57.19140625,
which is a terminating decimal.\n\nHowever, for N = 8 the maximum is achieved by
splitting it into three equal parts, so M(8) = 512/27, which is a non-terminating
decimal.\n\nLet D(N) = N if M(N) is a non-terminating decimal and D(N) = -N if M(N)
is a terminating decimal.\n\nFor example, ΣD(N) for 5 ≤ N ≤ 100 is 2438.\n\nFind
ΣD(N) for 5 ≤ N ≤ 10000.\n\n"