#P1734. 最大约数和
最大约数和
Description
Select several distinct positive integers whose total sum does not exceed , so that the sum of the proper divisors (excluding the number itself) of all selected numbers is maximized.
Input Format
Input a positive integer .
Output Format
Output the maximum possible sum of proper divisors.
11
9
Hint
【Sample Explanation】
Choose the numbers and to obtain the maximum value .
【Constraints】
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号