Given a number, find minimum sum of its factors.
Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and sum of factors in different ways. 12 = 12 * 1 = 12 + 1 = 13 12 = 2 * 6 = 2 + 6 = 8 12 = 3 * 4 = 3 + 4 = 7 12 = 2 * 2 * 3 = 2 + 2 + 3 = 7 Therefore minimum sum is 7 Input : 105 Output : 15
Please refer complete article on Find minimum sum of factors of number for more details!
My Personal Notes arrow_drop_up
- Java Program to Find sum of even factors of a number
- Program for Find sum of odd factors of a number
- Java Program to find Product of unique prime factors of a number
- Java Program for Number of elements with odd factors in given range
- Java Program for efficiently print all prime factors of a given number
- Java Program to Find the Number Occurring Odd Number of Times
- Java Program for Minimum number of jumps to reach end
- Java Program for Program to find area of a circle
- Java Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!
- Java Program to find sum of array
- Java Program to Find sum of Series with n-th term as n^2 - (n-1)^2
- Java Program for Sum the digits of a given number
- Java Program for Find largest prime factor of a number
- Java Program to Find Maximum Odd Number in Array Using Stream and Filter
- Java Program for How to check if a given number is Fibonacci number?
- Java Program for Program to calculate area of a Tetrahedron
- Java Program for Program for array rotation
- Program to find the sum of the series (1/a + 2/a^2 + 3/a^3 + ... + n/a^n)
- Java Program for Range sum queries without updates
- Java Program for cube sum of first n natural numbers