#P1249. 最大乘积
最大乘积
Description
A positive integer can generally be written as a sum of several pairwise distinct positive integers, such as , , , .
Your task is to decompose the given positive integer into a sum of several pairwise distinct positive integers (you may also choose not to decompose it and use the number itself), such that the product of these integers is maximized.
Input Format
A single positive integer ().
Output Format
The first line contains the decomposition, with adjacent numbers separated by a single space, in nondecreasing order.
The second line contains the maximum product.
10
2 3 5
30
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号