Answer the question
In order to leave comments, you need to log in
What is the maximum sum of divisors?
There is a task:
Дано число n. Найдите число из диапазона от 1 до n с максимальной суммой своих делителей (включая непростые делители, 1 и само число). Если таких чисел несколько, выведите минимальное из них.
Пример: Вход 5 -> выход 4. Вход 12 -> выход 12
Answer the question
In order to leave comments, you need to log in
The divisor of the number A is the number B, when divided by which the number A is an integer. And A can have many divisors.
The number 8 has divisors - 1, 2, 4, 8. Their sum is 15.
The number 9 has divisors - 1, 3, 9. Their sum is 13.
The sum of the divisors of 8 is greater
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question